From 6c8e2b48e3562d10b233d6ea32765ea42f547ea3 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Thu, 15 Dec 2011 16:10:21 +0000 Subject: [PATCH] Fix issue in saving libtorrent session state --- deluge/core/core.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deluge/core/core.py b/deluge/core/core.py index b618aae5b..b61e37cc2 100644 --- a/deluge/core/core.py +++ b/deluge/core/core.py @@ -136,9 +136,12 @@ class Core(component.Component): self.__new_release = None def stop(self): + log.debug("Core stopping...") + # Save the DHT state if necessary if self.config["dht"]: self.save_dht_state() + # Save the libtorrent session state self.__save_session_state() @@ -156,7 +159,7 @@ class Core(component.Component): """Saves the libtorrent session state""" try: session_state = deluge.configmanager.get_config_dir("session.state") - open(session_state, "wb").write(lt.bencode(self.session.state())) + open(session_state, "wb").write(lt.bencode(self.session.save_state())) except Exception, e: log.warning("Failed to save lt state: %s", e)