mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-21 12:04:51 +00:00
Fix saving dht state
This commit is contained in:
parent
04d14df8c7
commit
b6822f446a
1 changed files with 2 additions and 2 deletions
|
@ -130,7 +130,7 @@ class Core(component.Component):
|
|||
def stop(self):
|
||||
# Save the DHT state if necessary
|
||||
if self.config["dht"]:
|
||||
self.__save_dht_state()
|
||||
self.save_dht_state()
|
||||
# Save the libtorrent session state
|
||||
self.__save_session_state()
|
||||
|
||||
|
@ -156,7 +156,7 @@ class Core(component.Component):
|
|||
except Exception, e:
|
||||
log.warning("Failed to load lt state: %s", e)
|
||||
|
||||
def __save_dht_state(self):
|
||||
def save_dht_state(self):
|
||||
"""Saves the dht state to a file"""
|
||||
try:
|
||||
dht_data = open(deluge.common.get_default_config_dir("dht.state"), "wb")
|
||||
|
|
Loading…
Add table
Reference in a new issue