mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-03-26 08:54:48 +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:
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user