do non blocking connects
[spider.git] / perl / console.pl
index 208eb90a4b8969fd8fbd8e95d4386fdd07f39f85..aee1bc9ba485253b28b67eba16885602473fc25d 100755 (executable)
@@ -104,9 +104,7 @@ sub do_resize
 sub cease
 {
        my $sendz = shift;
-#      if ($conn && $sendz) {
-#              $conn->send_now("Z$call|bye...");
-#      }
+       $conn->disconnect if $conn;
        endwin();
        dbgclose();
        print @_ if @_;
@@ -437,6 +435,8 @@ if (! $conn) {
        exit(0);
 }
 
+$conn->set_error(sub{cease(0)});
+
 
 unless ($DB::VERSION) {
        $SIG{'INT'} = \&sig_term;