summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--paramiko/channel.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/paramiko/channel.py b/paramiko/channel.py
index 0773b855..9d2f76b9 100644
--- a/paramiko/channel.py
+++ b/paramiko/channel.py
@@ -1006,10 +1006,10 @@ class Channel (object):
def _wait_for_event(self):
while True:
self.event.wait(0.1)
- if self.closed:
- return False
if self.event.isSet():
break
+ if self.closed:
+ return False
return True
def _set_closed(self):