mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Remove incorrect code to handle broadcasts
This commit is contained in:
parent
b08ae690fa
commit
baeb7a1d58
@ -744,22 +744,6 @@ class SMART_DEVICE_APP(DeviceConfig, DevicePlugin):
|
|||||||
except:
|
except:
|
||||||
self._close_device_socket()
|
self._close_device_socket()
|
||||||
return (self.is_connected, self)
|
return (self.is_connected, self)
|
||||||
if getattr(self, 'broadcast_socket', None) is not None:
|
|
||||||
while True:
|
|
||||||
ans = select.select((self.broadcast_socket,), (), (), 0)
|
|
||||||
if len(ans[0]) > 0:
|
|
||||||
try:
|
|
||||||
packet = self.broadcast_socket.recvfrom(100)
|
|
||||||
remote = packet[1]
|
|
||||||
message = str(self.ZEROCONF_CLIENT_STRING + b' (on ' +
|
|
||||||
str(socket.gethostname().partition('.')[0]) +
|
|
||||||
b'),' + str(self.port))
|
|
||||||
self._debug('received broadcast', packet, message)
|
|
||||||
self.broadcast_socket.sendto(message, remote)
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
break
|
|
||||||
|
|
||||||
if getattr(self, 'listen_socket', None) is not None:
|
if getattr(self, 'listen_socket', None) is not None:
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user