aboutsummaryrefslogtreecommitdiff
path: root/demos/forward.py
diff options
context:
space:
mode:
authorJeremy T. Bouse <jbouse@debian.org>2014-02-14 21:29:58 -0500
committerJeremy T. Bouse <jbouse@debian.org>2014-02-14 21:29:58 -0500
commit3bb46c9cb414ca82afab715d2d0cc00ed71cfb6d (patch)
tree968464cb0214980291af70f9d1756d907b35aa6c /demos/forward.py
parent1a716ed46d1d556d4ba6798608ab498320acd886 (diff)
downloadpython-paramiko-cd88cff56ea217b57604eab509d8ba78f1aec8e6.tar
python-paramiko-cd88cff56ea217b57604eab509d8ba78f1aec8e6.tar.gz
Imported Upstream version 1.12.2upstream/1.12.2
Diffstat (limited to 'demos/forward.py')
-rw-r--r--demos/forward.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/demos/forward.py b/demos/forward.py
index 4e10785..5048c77 100644
--- a/demos/forward.py
+++ b/demos/forward.py
@@ -9,7 +9,7 @@
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
-# Paramiko is distrubuted in the hope that it will be useful, but WITHOUT ANY
+# Paramiko is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
@@ -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):