chiark / gitweb /
Close tunnel on connrefused.
authorian <ian>
Sat, 25 Sep 1999 03:02:44 +0000 (03:02 +0000)
committerian <ian>
Sat, 25 Sep 1999 03:02:44 +0000 (03:02 +0000)
ipif/udptunnel

index 7c977e1..7160cca 100755 (executable)
@@ -245,5 +245,6 @@ for (;;) {
            alarm($timeout) if $timeout;
        }
     }
+    if ($! == ECONNREFUSED) { quit("tunnel closed at remote end"); }
     $! == EAGAIN || warning("receive error: $!");
 }