Added ConnectionResetError exception handling while sending response
This commit is contained in:
джерело
72275a3270
коміт
ffe6b2bf3b
@ -248,7 +248,7 @@ class tcp_base(object):
|
|||||||
self.__connection__.sendall(data)
|
self.__connection__.sendall(data)
|
||||||
except BlockingIOError:
|
except BlockingIOError:
|
||||||
time.sleep(.1) # try again till timeout exceeds
|
time.sleep(.1) # try again till timeout exceeds
|
||||||
except BrokenPipeError:
|
except (BrokenPipeError, ConnectionResetError) as e:
|
||||||
self.logger.exception('%s Exception while sending data', self.__log_prefix__())
|
self.logger.exception('%s Exception while sending data', self.__log_prefix__())
|
||||||
self.__connection_lost__()
|
self.__connection_lost__()
|
||||||
return False
|
return False
|
||||||
|
Завантаження…
x
Посилання в новій задачі
Block a user