瀏覽代碼

Added ConnectionResetError exception handling while sending response

master
Dirk Alders 4 月之前
父節點
當前提交
ffe6b2bf3b
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      __init__.py

+ 1
- 1
__init__.py 查看文件

@@ -248,7 +248,7 @@ class tcp_base(object):
248 248
                     self.__connection__.sendall(data)
249 249
                 except BlockingIOError:
250 250
                     time.sleep(.1)  # try again till timeout exceeds
251
-                except BrokenPipeError:
251
+                except (BrokenPipeError, ConnectionResetError) as e:
252 252
                     self.logger.exception('%s Exception while sending data', self.__log_prefix__())
253 253
                     self.__connection_lost__()
254 254
                     return False

Loading…
取消
儲存