Author: damoxc
Revision: 6021
Log:
disconnect the client if getting information fails
Diff:
Modified: branches/1.2_RC/deluge/ui/web/json_api.py
===================================================================
--- branches/1.2_RC/deluge/ui/web/json_api.py 2009-12-13 21:49:10 UTC (rev
6020)
+++ branches/1.2_RC/deluge/ui/web/json_api.py 2009-12-13 21:50:16 UTC (rev
6021)
@@ -668,7 +668,8 @@
c.disconnect()
callback(_("Online"), info)
- def on_info_fail(reason):
+ def on_info_fail(reason, c):
+ c.disconnect()
callback(_("Offline"))
if not connected:
@@ -677,7 +678,7 @@
d = c.daemon.info()
d.addCallback(on_info, c)
- d.addErrback(on_info_fail)
+ d.addErrback(on_info_fail, c)
def on_connect_failed(reason, host_id):
callback(_("Offline"))
Modified: trunk/deluge/ui/web/json_api.py
===================================================================
--- trunk/deluge/ui/web/json_api.py 2009-12-13 21:49:10 UTC (rev 6020)
+++ trunk/deluge/ui/web/json_api.py 2009-12-13 21:50:16 UTC (rev 6021)
@@ -668,7 +668,8 @@
c.disconnect()
callback(_("Online"), info)
- def on_info_fail(reason):
+ def on_info_fail(reason, c):
+ c.disconnect()
callback(_("Offline"))
if not connected:
@@ -677,7 +678,7 @@
d = c.daemon.info()
d.addCallback(on_info, c)
- d.addErrback(on_info_fail)
+ d.addErrback(on_info_fail, c)
def on_connect_failed(reason, host_id):
callback(_("Offline"))
--
You received this message because you are subscribed to the Google Groups
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/deluge-commit?hl=en.