diff --git a/deluge/ui/gtkui/gtkui.py b/deluge/ui/gtkui/gtkui.py index 7f9680ec8..b8f435716 100644 --- a/deluge/ui/gtkui/gtkui.py +++ b/deluge/ui/gtkui/gtkui.py @@ -310,9 +310,6 @@ Please see the details below for more information."), details=traceback.format_e _("Error Starting Daemon"), _("There was an error starting the daemon process. Try running it from a console to see if there is an error.")).run() - # We'll try 30 reconnects at 500ms intervals - try_counter = 30 - def on_connect(connector): component.start() def on_connect_fail(result, try_counter): @@ -323,14 +320,14 @@ Please see the details below for more information."), details=traceback.format_e try_counter -= 1 import time time.sleep(0.5) - do_connect() + do_connect(try_counter) return result - def do_connect(): + def do_connect(try_counter): client.connect(*host[1:]).addCallback(on_connect).addErrback(on_connect_fail, try_counter) if try_connect: - do_connect() + do_connect(6) break if self.config["show_connection_manager_on_start"]: