From 3c4eb6201eff37b29149cdffa7362ee54970a13d Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Sun, 1 Jul 2007 03:18:54 +0000 Subject: [PATCH] fix bug of dht starting before a listening port is set --- src/core.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/core.py b/src/core.py index f10d5b571..0c30da787 100644 --- a/src/core.py +++ b/src/core.py @@ -64,7 +64,6 @@ PREF_FUNCTIONS = { "max_uploads" : deluge_core.set_max_uploads, "listen_on" : deluge_core.set_listen_on, "max_connections" : deluge_core.set_max_connections, - "enable_dht" : None, # not a normal pref in that is is applied only on start "max_active_torrents" : None, # no need for a function, applied constantly "auto_seed_ratio" : None, # no need for a function, applied constantly "max_download_rate_bps" : deluge_core.set_download_rate_limit, @@ -209,13 +208,13 @@ class Manager: # Load the preferences self.config = pref.Preferences(os.path.join(self.base_dir, PREFS_FILENAME)) - - # Set the enable_dht PREF_FUNCTION - PREF_FUNCTIONS["enable_dht"] = self.set_DHT # Apply preferences. Note that this is before any torrents are added self.apply_prefs() + # Set the enable_dht PREF_FUNCTION + PREF_FUNCTIONS["enable_dht"] = self.set_DHT + # Unpickle the state, or create a new one if not blank_slate: try: