summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRobey Pointer <robey@lag.net>2004-11-22 07:07:08 +0000
committerRobey Pointer <robey@lag.net>2004-11-22 07:07:08 +0000
commit611d66428ed7d1885c406e490dfe8bd7a3307fea (patch)
treec6fda1b5ba7bc2209416576c4582ca399debf362
parent961525f3d8381b9cfc717f01c5c44cec83649106 (diff)
[project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-112]
add finish_subsystem() when a SubsystemHandler is being decomissioned (the client has closed the channel or transport, or the socket went away), make a callback to let the handler do any shutdown it needs to.
-rw-r--r--paramiko/server.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/paramiko/server.py b/paramiko/server.py
index bfb59eaf..23bd036a 100644
--- a/paramiko/server.py
+++ b/paramiko/server.py
@@ -325,7 +325,7 @@ class SubsystemHandler (threading.Thread):
(self.__name, str(e)))
self.__transport._log(ERROR, util.tb_strings())
try:
- self.__channel.close()
+ self.finish_subsystem()
except:
pass
@@ -356,3 +356,12 @@ class SubsystemHandler (threading.Thread):
@type channel: L{Channel}
"""
pass
+
+ def finish_subsystem(self):
+ """
+ Perform any cleanup at the end of a subsystem. The default
+ implementation just closes the channel.
+
+ @since: 1.1
+ """
+ self.__channel.close()