pathoc: handle error when selecting on read file

This commit is contained in:
Aldo Cortesi
2016-10-19 22:05:25 +13:00
parent 25e866b669
commit f4da81f749

View File

@@ -121,7 +121,10 @@ class WebsocketFrameReader(basethread.BaseThread):
while True:
if self.ws_read_limit == 0:
return
r, _, _ = select.select([self.rfile], [], [], 0.05)
try:
r, _, _ = select.select([self.rfile], [], [], 0.05)
except OSError:
return
delta = time.time() - starttime
if not r and self.timeout and delta > self.timeout:
return