From 71123c0de1df4030ad0bcab4b7db571b24906991 Mon Sep 17 00:00:00 2001 From: jobevers Date: Sat, 11 Feb 2017 08:49:59 -0600 Subject: [PATCH] add warning log on EWOULDBLOCK --- lbrynet/dht/protocol.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lbrynet/dht/protocol.py b/lbrynet/dht/protocol.py index 063b9fb97..a58d7ba8b 100644 --- a/lbrynet/dht/protocol.py +++ b/lbrynet/dht/protocol.py @@ -254,11 +254,13 @@ class KademliaProtocol(protocol.DatagramProtocol): del self._call_later_list[key] if self.transport: try: - # i'm scared this may swallow important errors, but i get a million of these - # on Linux and it doesnt seem to affect anything -grin self.transport.write(txData, address) except socket.error as err: - if err.errno != errno.EWOULDBLOCK: + if err.errno == errno.EWOULDBLOCK: + # i'm scared this may swallow important errors, but i get a million of these + # on Linux and it doesnt seem to affect anything -grin + log.warning("Can't send data to dht: EWOULDBLOCK") + else: raise err def _sendResponse(self, contact, rpcID, response):