Przeglądaj źródła

more general error

justheuristic 4 lat temu
rodzic
commit
cc3f28655a
2 zmienionych plików z 2 dodań i 2 usunięć
  1. 1 1
      hivemind/averaging/averager.py
  2. 1 1
      hivemind/dht/__init__.py

+ 1 - 1
hivemind/averaging/averager.py

@@ -243,7 +243,7 @@ class DecentralizedAverager(mp.Process, ServicerBase):
                 while True:
                     try:
                         method, args, kwargs = await loop.run_in_executor(pipe_awaiter, self._inner_pipe.recv)
-                    except (OSError, BrokenPipeError) as e:
+                    except (OSError, ConnectionError) as e:
                         logger.exception(e)
                         await asyncio.sleep(self._matchmaking.request_timeout)
                         continue

+ 1 - 1
hivemind/dht/__init__.py

@@ -121,7 +121,7 @@ class DHT(mp.Process):
                 while True:
                     try:
                         method, args, kwargs = await loop.run_in_executor(pipe_awaiter, self._inner_pipe.recv)
-                    except (OSError, BrokenPipeError) as e:
+                    except (OSError, ConnectionError) as e:
                         logger.exception(e)
                         await asyncio.sleep(self._node.protocol.wait_timeout)
                         continue