paramiko/paramiko — pull request #436 by johnkeeping (2014-11-13 10:39:54+00:00)
Title: transport: notify accept condition on clean disconnect

When a clean disconnect happens, setting the transport to be inactive
immediately means that it skips the cleanup at the bottom of the run()
method and avoids waking up anyone waiting on the accept() method.

Remove the cleanup in the disconnect message handler and instead allow
the normal cleanup code to do this as well as notify any waiting threads
that something has happened.