From 4dff7074d1f3f331047d67bff5a9780c0e8457d0 Mon Sep 17 00:00:00 2001 From: Olle Lundberg Date: Fri, 15 Aug 2014 12:16:38 +0200 Subject: Don't try to join() if we are the current thread. This fixes #354. --- paramiko/transport.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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... -- cgit v1.2.3