Better fix for #565
This commit is contained in:
parent
dc0a2ce52e
commit
951c13f1ce
|
@ -127,11 +127,7 @@ class ConnectionManager(component.Component):
|
||||||
# If classic mode is set, we just start up a localhost daemon and connect to it
|
# If classic mode is set, we just start up a localhost daemon and connect to it
|
||||||
if self.gtkui_config["classic_mode"]:
|
if self.gtkui_config["classic_mode"]:
|
||||||
uri = "http://localhost:58846"
|
uri = "http://localhost:58846"
|
||||||
if deluge.common.windows_check():
|
self.start_localhost(58846)
|
||||||
win32api.WinExec("deluged -p 58846")
|
|
||||||
else:
|
|
||||||
subprocess.call(["deluged", "-p 58846"])
|
|
||||||
time.sleep(0.1)
|
|
||||||
# We need to wait for the host to start before connecting
|
# We need to wait for the host to start before connecting
|
||||||
while not self.test_online_status(uri):
|
while not self.test_online_status(uri):
|
||||||
time.sleep(0.01)
|
time.sleep(0.01)
|
||||||
|
@ -162,10 +158,7 @@ class ConnectionManager(component.Component):
|
||||||
port = uri[7:].split(":")[1]
|
port = uri[7:].split(":")[1]
|
||||||
# First add it to the list
|
# First add it to the list
|
||||||
self.add_host("localhost", port)
|
self.add_host("localhost", port)
|
||||||
if deluge.common.windows_check():
|
self.start_localhost(port)
|
||||||
win32api.WinExec("deluged -p %s" % port)
|
|
||||||
else:
|
|
||||||
subprocess.call(["deluged", "-p %s" % port])
|
|
||||||
# We need to wait for the host to start before connecting
|
# We need to wait for the host to start before connecting
|
||||||
while not self.test_online_status(uri):
|
while not self.test_online_status(uri):
|
||||||
time.sleep(0.01)
|
time.sleep(0.01)
|
||||||
|
|
Loading…
Reference in New Issue