Log server name when we see a _send failure

This commit is contained in:
jesopo 2019-05-30 15:46:01 +01:00
parent 322776bd2d
commit a3a61d2e86

View file

@ -237,7 +237,13 @@ class Bot(object):
for piece in data:
sock.parse_data(piece)
elif event & select.EPOLLOUT:
try:
sock._send()
except:
self.log.error("Failed to write to %s",
[str(sock)])
raise
if sock.fileno() in self.servers:
self.register_read(sock)
elif event & select.EPULLHUP: