Merge pull request #33 from ngosang/feature/exceptions
Handle ConnectionReset and ConnectionRefused errors in dht.py
This commit is contained in:
commit
9dc1684e75
@ -73,6 +73,10 @@ class SybilNode:
|
||||
data = buffer.tobytes()
|
||||
except BlockingIOError:
|
||||
break
|
||||
except ConnectionResetError:
|
||||
continue
|
||||
except ConnectionRefusedError:
|
||||
continue
|
||||
|
||||
# Ignore nodes that uses port 0 (assholes).
|
||||
if addr[1] == 0:
|
||||
|
Loading…
Reference in New Issue
Block a user