diff options
author | Olle Lundberg <geek@nerd.sh> | 2014-08-15 12:16:38 +0200 |
---|---|---|
committer | Olle Lundberg <geek@nerd.sh> | 2014-08-15 12:16:38 +0200 |
commit | 4dff7074d1f3f331047d67bff5a9780c0e8457d0 (patch) | |
tree | 821ceb99a0204765dfa332fefe23b26a20373b32 | |
parent | 991d56bad32c1ea4eda6c86771a4a4b7bef00475 (diff) |
Don't try to join() if we are the current thread.
This fixes #354.
-rw-r--r-- | paramiko/transport.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/paramiko/transport.py b/paramiko/transport.py index 406626a7..3463cfcf 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -1256,7 +1256,7 @@ class Transport (threading.Thread): def stop_thread(self): self.active = False self.packetizer.close() - while self.isAlive(): + while self.is_alive() and (self is not threading.current_thread()): self.join(10) ### internals... |