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 7c977e172f6e7b9eb1a23abace21fa938426e922..7160cca33a9c55d19a8cc78f2d45ba7e7cc9836a 100755 (executable)
@@ -245,5 +245,6 @@ for (;;) {
            alarm($timeout) if $timeout;
        }
     }
+    if ($! == ECONNREFUSED) { quit("tunnel closed at remote end"); }
     $! == EAGAIN || warning("receive error: $!");
 }