diff options
author | Thomas Kriechbaumer <Kriechi@users.noreply.github.com> | 2016-10-19 11:27:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-19 11:27:39 +0200 |
commit | e9f7cf68e90ed9269b4b51342fcd652666096b56 (patch) | |
tree | c6e0f79a6d73a23864e0c120617a8aaf0509e383 | |
parent | 25e866b669f0a4348bdf12eea4ea661eee5246fe (diff) | |
parent | f4da81f749c5f3660c6dfeaab435c344c1005945 (diff) | |
download | mitmproxy-e9f7cf68e90ed9269b4b51342fcd652666096b56.tar.gz mitmproxy-e9f7cf68e90ed9269b4b51342fcd652666096b56.tar.bz2 mitmproxy-e9f7cf68e90ed9269b4b51342fcd652666096b56.zip |
Merge pull request #1634 from cortesi/pathoc
pathoc: handle error when selecting on read file
-rw-r--r-- | pathod/pathoc.py | 5 |
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 |