1. I believe I have fixed all the login/logout 'broken pipe' errors
[spider.git] / perl / client.pl
index 1b6757b48c27c09c63ea7f19f1a4167a50c014d8..66c7b0927337d88443097fb62b2c1daa1cc5dce9 100755 (executable)
@@ -51,10 +51,10 @@ use IPC::Open2;
 sub cease
 {
        my $sendz = shift;
-       if ($conn && $sendz) {
-               $conn->send_now("Z$call|bye...");
-               sleep(1);
-       }
+#      if ($conn && $sendz) {
+#              $conn->send_now("Z$call|bye...");
+#              sleep(1);
+#      }
        $stdout->flush if $stdout;
        if ($pid) {
                dbg('connect', "killing $pid");
@@ -99,7 +99,7 @@ sub rec_socket
 {
        my ($con, $msg, $err) = @_;
        if (defined $err && $err) {
-               cease(1);
+               cease(0);
        }
        if (defined $msg) {
                my ($sort, $call, $line) = $msg =~ /^(\w)([^\|]+)\|(.*)$/;
@@ -155,6 +155,8 @@ sub rec_socket
                # any other sorts that might happen are silently ignored.
                # ******************************************************
                # ******************************************************
+       } else {
+               cease(0);
        }
        $lasttime = time; 
 }