chiark / gitweb /
Close tunnel on connrefused.
[userv-utils.git] / 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: $!");
 }