Skip to content

Commit 43477aa

Browse files
author
侯锐
committed
对每个连接的读操作做错误捕获
1 parent be133e7 commit 43477aa

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

dubbo/connection/connections.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,10 @@ def _read_from_server(self):
292292
logger.exception(e)
293293
break
294294
for conn in readable:
295-
conn.read(self._callback)
295+
try:
296+
conn.read(self._callback)
297+
except Exception as e:
298+
logger.exception(e)
296299

297300
def _new_connection(self, host):
298301
ip, port = host.split(':')

0 commit comments

Comments
 (0)