aboutsummaryrefslogtreecommitdiffstats
path: root/pathod
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-10-19 22:05:25 +1300
committerAldo Cortesi <aldo@nullcube.com>2016-10-19 22:05:25 +1300
commitf4da81f749c5f3660c6dfeaab435c344c1005945 (patch)
treec6e0f79a6d73a23864e0c120617a8aaf0509e383 /pathod
parent25e866b669f0a4348bdf12eea4ea661eee5246fe (diff)
downloadmitmproxy-f4da81f749c5f3660c6dfeaab435c344c1005945.tar.gz
mitmproxy-f4da81f749c5f3660c6dfeaab435c344c1005945.tar.bz2
mitmproxy-f4da81f749c5f3660c6dfeaab435c344c1005945.zip
pathoc: handle error when selecting on read file
Diffstat (limited to 'pathod')
-rw-r--r--pathod/pathoc.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pathod/pathoc.py b/pathod/pathoc.py
index e3b4d1ae..e9fa5c43 100644
--- a/pathod/pathoc.py
+++ b/pathod/pathoc.py
@@ -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