catch id validation errors
This commit is contained in:
parent
edb8928f5c
commit
628c46e5d9
1 changed files with 2 additions and 2 deletions
|
@ -205,14 +205,14 @@ class KademliaProtocol(protocol.DatagramProtocol):
|
|||
return
|
||||
try:
|
||||
msgPrimitive = self._encoder.decode(datagram)
|
||||
except encoding.DecodeError:
|
||||
message = self._translator.fromPrimitive(msgPrimitive)
|
||||
except (encoding.DecodeError, ValueError):
|
||||
# We received some rubbish here
|
||||
return
|
||||
except IndexError:
|
||||
log.warning("Couldn't decode dht datagram from %s", address)
|
||||
return
|
||||
|
||||
message = self._translator.fromPrimitive(msgPrimitive)
|
||||
remoteContact = Contact(message.nodeID, address[0], address[1], self)
|
||||
|
||||
now = time.time()
|
||||
|
|
Loading…
Reference in a new issue