summaryrefslogtreecommitdiffhomepage
path: root/demos/forward.py
diff options
context:
space:
mode:
Diffstat (limited to 'demos/forward.py')
-rw-r--r--demos/forward.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/demos/forward.py b/demos/forward.py
index 4e107855..2a4c4248 100644
--- a/demos/forward.py
+++ b/demos/forward.py
@@ -78,9 +78,11 @@ class Handler (SocketServer.BaseRequestHandler):
if len(data) == 0:
break
self.request.send(data)
+
+ peername = self.request.getpeername()
chan.close()
self.request.close()
- verbose('Tunnel closed from %r' % (self.request.getpeername(),))
+ verbose('Tunnel closed from %r' % (peername,))
def forward_tunnel(local_port, remote_host, remote_port, transport):