From 7e0932815dbd0e0f8e181c815014bcce560cc5eb Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Thu, 19 Oct 2017 01:46:32 +0200 Subject: [PATCH] UDP socket closing fix - invalid data or an incomplete read on UDP socket caused it to close --- src/network/bmproto.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/network/bmproto.py b/src/network/bmproto.py index a086fde0..fb0fea30 100644 --- a/src/network/bmproto.py +++ b/src/network/bmproto.py @@ -114,6 +114,9 @@ class BMProto(AdvancedDispatcher, ObjectTracker): logger.debug("%s:%i already got object, skipping", self.destination.host, self.destination.port) except struct.error: logger.debug("decoding error, skipping") + elif self.socket.type == socket.SOCK_DGRAM: + # broken read, ignore + pass else: #print "Skipping command %s due to invalid data" % (self.command) logger.debug("Closing due to invalid command %s", self.command)