summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--paramiko/transport.py2
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...