Fix unnecessary error popup during shutdown if the wireless device driver is running and mdns de-registration fails. Fixes #1262819 [Calibre throws error when stopping wireless device connection](https://bugs.launchpad.net/calibre/+bug/1262819)

Merge branch 'master' of https://github.com/cbhaley/calibre
This commit is contained in:
Kovid Goyal 2014-01-06 14:22:50 +05:30
commit 0c7e911325

View File

@ -1571,8 +1571,12 @@ class SMART_DEVICE_APP(DeviceConfig, DevicePlugin):
def shutdown(self):
if getattr(self, 'listen_socket', None) is not None:
self.connection_listener.stop()
try:
unpublish_zeroconf('calibre smart device client',
'_calibresmartdeviceapp._tcp', self.port, {})
except:
self._debug('deregistration with bonjour failed')
traceback.print_exc()
self._close_listen_socket()
# Methods for dynamic control