Deal with keyboard interrupt correctly.
This commit is contained in:
parent
1e2d880d6d
commit
795e4bb2db
@ -537,6 +537,7 @@ class MostlyReliablePipe(object):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def _retransmit_check_worker(self):
|
def _retransmit_check_worker(self):
|
||||||
|
try:
|
||||||
now = time.time()
|
now = time.time()
|
||||||
for key in self._incoming.keys()[:]:
|
for key in self._incoming.keys()[:]:
|
||||||
message = self._incoming[key]
|
message = self._incoming[key]
|
||||||
@ -551,6 +552,8 @@ class MostlyReliablePipe(object):
|
|||||||
self._dispatched[key] = message
|
self._dispatched[key] = message
|
||||||
message.set_dispatch_time()
|
message.set_dispatch_time()
|
||||||
del self._incoming[key]
|
del self._incoming[key]
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def _process_incoming_data(self, segment):
|
def _process_incoming_data(self, segment):
|
||||||
|
Loading…
Reference in New Issue
Block a user