Handle connection exceptions in dht

This commit is contained in:
Diego 2017-04-16 21:02:34 +02:00
parent 7ffe670147
commit 4f020cfad1

View File

@ -72,6 +72,10 @@ class SybilNode:
data = buffer.tobytes() data = buffer.tobytes()
except BlockingIOError: except BlockingIOError:
break break
except ConnectionResetError:
continue
except ConnectionRefusedError:
continue
# Ignore nodes that uses port 0 (assholes). # Ignore nodes that uses port 0 (assholes).
if addr[1] == 0: if addr[1] == 0: