Module: deluge Branch: master Commit: 6f3bc5620f6624eff5717539207c14c124a9fc2d
Author: Pedro Algarvio <u...@ufsoft.org> Date: Sun May 1 07:41:44 2011 +0100 Fix #1824. When connected to a client, and then trying to connect to another, the connection manager component will be stopped(while the connect deferred is still running), so, the ConnectionManager.connection_manager reference will be deleted. If that's not the case, close the dialog. --- deluge/ui/gtkui/connectionmanager.py | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/deluge/ui/gtkui/connectionmanager.py b/deluge/ui/gtkui/connectionmanager.py index c61fe4a..55da39b 100644 --- a/deluge/ui/gtkui/connectionmanager.py +++ b/deluge/ui/gtkui/connectionmanager.py @@ -498,7 +498,12 @@ class ConnectionManager(component.Component): def __on_connected(self, daemon_info, host_id): if self.gtkui_config["autoconnect"]: self.gtkui_config["autoconnect_host_id"] = host_id - self.connection_manager.response(gtk.RESPONSE_OK) + if self.running: + # When connected to a client, and then trying to connect to another, + # this component will be stopped(while the connect deferred is + # runing), so, self.connection_manager will be deleted. + # If that's not the case, close the dialog. + self.connection_manager.response(gtk.RESPONSE_OK) component.start() def __on_connected_failed(self, reason, host_id, host, port, user): -- You received this message because you are subscribed to the Google Groups "deluge-commit" group. To post to this group, send email to deluge-commit@googlegroups.com. To unsubscribe from this group, send email to deluge-commit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/deluge-commit?hl=en.