account for the entire range of ports that the user has in preferences
This commit is contained in:
parent
83d45c4626
commit
639cc297d2
|
@ -850,10 +850,11 @@ class Manager:
|
||||||
if self.get_pref("random_port") == False:
|
if self.get_pref("random_port") == False:
|
||||||
PREF_FUNCTIONS[pref](self.get_pref(pref))
|
PREF_FUNCTIONS[pref](self.get_pref(pref))
|
||||||
else:
|
else:
|
||||||
if deluge_core.listening_port() != 0 and \
|
if deluge_core.listening_port() != 0:
|
||||||
deluge_core.listening_port() != self.get_pref("listen_on")[0] \
|
for i in xrange(int(self.get_pref("listen_on")[0]),\
|
||||||
and deluge_core.listening_port() != self.get_pref("listen_on")[1]:
|
int(self.get_pref("listen_on")[1])):
|
||||||
pass
|
if deluge_core.listening_port() != i:
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
import random
|
import random
|
||||||
ports = [random.randrange(49152, 65535), random.randrange(49152, 65535)]
|
ports = [random.randrange(49152, 65535), random.randrange(49152, 65535)]
|
||||||
|
|
Loading…
Reference in New Issue