mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-04-30 13:11:47 +08:00
pathoc: handle error when selecting on read file
This commit is contained in:
@@ -121,7 +121,10 @@ class WebsocketFrameReader(basethread.BaseThread):
|
|||||||
while True:
|
while True:
|
||||||
if self.ws_read_limit == 0:
|
if self.ws_read_limit == 0:
|
||||||
return
|
return
|
||||||
r, _, _ = select.select([self.rfile], [], [], 0.05)
|
try:
|
||||||
|
r, _, _ = select.select([self.rfile], [], [], 0.05)
|
||||||
|
except OSError:
|
||||||
|
return
|
||||||
delta = time.time() - starttime
|
delta = time.time() - starttime
|
||||||
if not r and self.timeout and delta > self.timeout:
|
if not r and self.timeout and delta > self.timeout:
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user