소스 검색

fix test warning

Denis Mazur 4 년 전
부모
커밋
1e96285738
2개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 0 0
      hivemind/moe/server/connection_handler_p2p.py
  2. 4 1
      hivemind/p2p/p2p_daemon_bindings/control.py

+ 0 - 0
hivemind/moe/server/connection_handler_p2p.py


+ 4 - 1
hivemind/p2p/p2p_daemon_bindings/control.py

@@ -147,7 +147,10 @@ class ControlClient:
     async def _read_from_persistent_conn(self, reader: asyncio.StreamReader):
         while True:
             resp = p2pd_pb.PersistentConnectionResponse()
-            await read_pbmsg_safe(reader, resp)
+            try:
+                await read_pbmsg_safe(reader, resp)
+            except asyncio.IncompleteReadError:
+                break
 
             call_id = UUID(bytes=resp.callId)