summaryrefslogtreecommitdiffhomepage
path: root/demos
diff options
context:
space:
mode:
Diffstat (limited to 'demos')
-rw-r--r--[-rwxr-xr-x]demos/forward.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/demos/forward.py b/demos/forward.py
index f91e969e..4affcfaf 100755..100644
--- a/demos/forward.py
+++ b/demos/forward.py
@@ -60,6 +60,10 @@ class Handler (SocketServer.BaseRequestHandler):
self.chain_port,
repr(e)))
return
+ if chan is None:
+ verbose('Incoming request to %s:%d was rejected by the SSH server.' %
+ (self.chain_host, self.chain_port))
+ return
verbose('Connected! Tunnel open.')
while True: