reorder the event check so that a positive event is noticed before a closed channel
This commit is contained in:
parent
2262f7f188
commit
0627f09494
|
@ -1006,10 +1006,10 @@ class Channel (object):
|
||||||
def _wait_for_event(self):
|
def _wait_for_event(self):
|
||||||
while True:
|
while True:
|
||||||
self.event.wait(0.1)
|
self.event.wait(0.1)
|
||||||
if self.closed:
|
|
||||||
return False
|
|
||||||
if self.event.isSet():
|
if self.event.isSet():
|
||||||
break
|
break
|
||||||
|
if self.closed:
|
||||||
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def _set_closed(self):
|
def _set_closed(self):
|
||||||
|
|
Loading…
Reference in New Issue