Asyncore UDP fix

- when there was an error writing to a udp socket, it wasn't
handled correctly
This commit is contained in:
Peter Šurda 2017-10-06 18:26:06 +02:00
parent 333170b172
commit a49b3b5f84
Signed by untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87
1 changed files with 1 additions and 0 deletions

View File

@ -151,6 +151,7 @@ class UDPSocket(BMProto):
retval = self.socket.sendto(self.write_buf, ('<broadcast>', UDPSocket.port))
except socket.error as e:
logger.error("socket error on sendato: %s", str(e))
retval = 0
self.slice_write_buf(retval)