Merge pull request #33 from ngosang/feature/exceptions

Handle ConnectionReset and ConnectionRefused errors in dht.py
This commit is contained in:
Bora M. Alper 2017-04-25 21:52:05 +04:00 committed by GitHub
commit 9dc1684e75

View File

@ -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: