diff options
author | Paul Kapp <paullkapp+radssh@gmail.com> | 2017-08-18 19:22:34 -0400 |
---|---|---|
committer | Paul Kapp <paullkapp+radssh@gmail.com> | 2017-08-18 19:22:34 -0400 |
commit | cb7fb16e110a1906140ea6c51b858362823e9918 (patch) | |
tree | 6803466b0c3ed0758e9ad9c31fd449863bc6758d | |
parent | 08f503740182608570ac87661225fe2e11914d8f (diff) |
Common up break out of Transport.run() loop
Can’t seem to reason out any advantage of clearing self.active and
calling self.packetizer.close() in these situations instead of simply
breaking out of loop and allowing the additional conditional cleanups
to be done. Currently looking into tackling some needed cleanup in
auth_handler, and not having the auth_handler.abort() called on server
disconnect feels like a bug - who knows?
-rw-r--r-- | paramiko/transport.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/paramiko/transport.py b/paramiko/transport.py index bab23fa1..388f60cb 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -1825,8 +1825,6 @@ class Transport(threading.Thread, ClosingContextManager): continue elif ptype == MSG_DISCONNECT: self._parse_disconnect(m) - self.active = False - self.packetizer.close() break elif ptype == MSG_DEBUG: self._parse_debug(m) @@ -1850,8 +1848,7 @@ class Transport(threading.Thread, ClosingContextManager): self._log(DEBUG, 'Ignoring message for dead channel %d' % chanid) # noqa else: self._log(ERROR, 'Channel request for unknown channel %d' % chanid) # noqa - self.active = False - self.packetizer.close() + break elif ( self.auth_handler is not None and ptype in self.auth_handler._handler_table |