Stop that annoying keyerror - HB3XPL ;-)

This commit is contained in:
Simon 2021-05-07 11:19:09 +01:00
parent 7aa3a142da
commit 28eeab388c

View File

@ -68,7 +68,10 @@ class Proxy(DatagramProtocol):
_peer_id = self.connTrack[port]
elif _command == MSTN:
_peer_id = data[6:10]
self.peerTrack[_peer_id]['timer'].cancel()
try:
self.peerTrack[_peer_id]['timer'].cancel()
except KeyError:
return
self.reaper(_peer_id)
return
elif _command == MSTP: