fix bug of dht starting before a listening port is set

This commit is contained in:
Marcos Pinto 2007-07-01 03:18:54 +00:00
parent 728107f3a8
commit 3c4eb6201e
1 changed files with 3 additions and 4 deletions

View File

@ -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: