catch network-unreachable error in dht protocol
This commit is contained in:
parent
7f36bed79d
commit
422dbb549b
1 changed files with 4 additions and 0 deletions
|
@ -367,7 +367,11 @@ class KademliaProtocol(protocol.DatagramProtocol):
|
|||
# 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.debug("Can't send data to dht: EWOULDBLOCK")
|
||||
elif err.errno == errno.ENETUNREACH:
|
||||
# this should probably try to retransmit when the network connection is back
|
||||
log.error("Network is unreachable")
|
||||
else:
|
||||
log.error("DHT socket error: %s (%i)", err.message, err.errno)
|
||||
raise err
|
||||
|
||||
def _sendResponse(self, contact, rpcID, response):
|
||||
|
|
Loading…
Reference in a new issue