no error if network is down

This commit is contained in:
j 2016-02-18 20:38:00 +05:30
parent a9d33dd2d8
commit e90e6c57a4
1 changed files with 2 additions and 0 deletions

View File

@ -186,6 +186,8 @@ class LocalNodes4(LocalNodesBase):
s.setsockopt (socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, self._TTL)
try:
s.sendto(packet + b'\0', sockaddr)
except OSError:
pass
except:
logger.debug('LocalNodes4.send failed', exc_info=True)
s.close()