diff options
| -rw-r--r-- | libpathod/pathoc.py | 7 | 
1 files changed, 5 insertions, 2 deletions
| diff --git a/libpathod/pathoc.py b/libpathod/pathoc.py index 53ba4447..2574da6c 100644 --- a/libpathod/pathoc.py +++ b/libpathod/pathoc.py @@ -161,7 +161,11 @@ class WebsocketFrameReader(threading.Thread):                  pass              for rfile in r:                  with self.log(rfile) as log: -                    frm = websockets.Frame.from_file(self.rfile) +                    try: +                        frm = websockets.Frame.from_file(self.rfile) +                    except tcp.NetLibError: +                        self.ws_read_limit = 0 +                        break                      log("<< %s"%frm.header.human_readable())                      self.callback(frm)                      if self.ws_read_limit is not None: @@ -479,4 +483,3 @@ def main(args): # pragma: nocover          pass      if p:          p.stop() -        p.wait() | 
