mirror of https://github.com/huashengdun/webssh
Close handler with reason why worker closed
parent
9b38d111f4
commit
105c1f62ee
|
@ -94,11 +94,11 @@ class Worker(object):
|
|||
|
||||
def close(self, reason=None):
|
||||
logging.info(
|
||||
'Closing worker {} with reason {}'.format(self.id, reason)
|
||||
'Closing worker {} with reason: {}'.format(self.id, reason)
|
||||
)
|
||||
if self.handler:
|
||||
self.loop.remove_handler(self.fd)
|
||||
self.handler.close()
|
||||
self.handler.close(reason=reason)
|
||||
self.chan.close()
|
||||
self.ssh.close()
|
||||
logging.info('Connection to {}:{} lost'.format(*self.dst_addr))
|
||||
|
|
Loading…
Reference in New Issue