Skip to content

Instantly share code, notes, and snippets.

View andriy-s's full-sized avatar

Andriy Syrovenko andriy-s

View GitHub Profile
--- core/server.py.orig 2015-02-28 16:34:33.000000000 +0200
+++ core/server.py 2015-02-28 16:45:24.000000000 +0200
@@ -178,7 +178,12 @@
if not self._address_info or (datetime.now() - self._address_info_resolved_time).seconds > ADDRESS_INFO_REFRESH_TIME:
# converts addresses tuple to list and adds a 6th parameter for availability (None = not checked, True = available, False=not available) and a 7th parameter for the checking time
try:
- self._address_info = [list(address) + [None, None] for address in socket.getaddrinfo(self.host, self.port, socket.AF_UNSPEC, socket.SOCK_STREAM, socket.IPPROTO_TCP, socket.AI_ADDRCONFIG | socket.AI_V4MAPPED)]
+ try:
+ self._address_info = [list(address) + [None, None] for address in socket.getaddrinfo(self.host, self.port, socket.AF_UNSPEC, socket.SOCK_STREAM, socket.IPPROTO_TCP, socket.AI_ADDRCONFIG | socket.AI_V4MAPPED)]
+ except socket.gaierror as e: