[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.
This commit is contained in:
parent
961525f3d8
commit
611d66428e
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue