try to clean up if the server object throws an exception
This commit is contained in:
Robey Pointer 2006-04-29 19:32:38 -07:00
parent c278de9fd4
commit e646d0ee4c
1 changed files with 7 additions and 1 deletions

View File

@ -92,7 +92,13 @@ class SFTPServer (BaseSFTP, SubsystemHandler):
return
msg = Message(data)
request_number = msg.get_int()
try:
self._process(t, request_number, msg)
except Exception, e:
self._log(DEBUG, 'Exception in server processing: ' + str(e))
self._log(DEBUG, util.tb_strings())
# send some kind of failure message, at least
self._send_status(request_number, SFTP_FAILURE)
def finish_subsystem(self):
self.server.session_ended()