From 7ee3a1703d23f73e74097586070a5340579c7f1a Mon Sep 17 00:00:00 2001 From: Charles Haley Date: Sun, 16 Mar 2014 15:56:40 +0100 Subject: [PATCH] If the user closes calibre while connected to a wireless device, cleanly disconnect and flush the metadata cache. --- src/calibre/devices/smart_device_app/driver.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/calibre/devices/smart_device_app/driver.py b/src/calibre/devices/smart_device_app/driver.py index 9d89e264cf..81f41db06b 100644 --- a/src/calibre/devices/smart_device_app/driver.py +++ b/src/calibre/devices/smart_device_app/driver.py @@ -1779,6 +1779,7 @@ class SMART_DEVICE_APP(DeviceConfig, DevicePlugin): @synchronous('sync_lock') def shutdown(self): + self._close_device_socket() if getattr(self, 'listen_socket', None) is not None: self.connection_listener.stop() try: