Show More
@@ -80,6 +80,7 b' from __future__ import absolute_import, ' | |||
|
80 | 80 | __email__ = "paul at scott dash murphy dot com" |
|
81 | 81 | __version__ = "0.12" |
|
82 | 82 | |
|
83 | import errno | |
|
83 | 84 | import itertools |
|
84 | 85 | import select |
|
85 | 86 | import socket |
@@ -937,7 +938,16 b' class Listener(object):' | |||
|
937 | 938 | self.zeroconf.engine.addReader(self, self.zeroconf.socket) |
|
938 | 939 | |
|
939 | 940 | def handle_read(self): |
|
940 | data, (addr, port) = self.zeroconf.socket.recvfrom(_MAX_MSG_ABSOLUTE) | |
|
941 | data = addr = port = None | |
|
942 | sock = self.zeroconf.socket | |
|
943 | try: | |
|
944 | data, (addr, port) = sock.recvfrom(_MAX_MSG_ABSOLUTE) | |
|
945 | except socket.error as e: | |
|
946 | if e.errno == errno.EBADF: | |
|
947 | # some other thread may close the socket | |
|
948 | return | |
|
949 | else: | |
|
950 | raise | |
|
941 | 951 | self.data = data |
|
942 | 952 | msg = DNSIncoming(data) |
|
943 | 953 | if msg.isQuery(): |
General Comments 0
You need to be logged in to leave comments.
Login now