Opened 12 years ago

Closed 12 years ago

#2038 closed bug (Fixed)

Chrome 17 disconnecting from webui

Reported by: Cas Owned by: damoxc
Priority: major Milestone: 1.3.4
Component: Web UI Version: 1.3.3
Keywords: Cc: bobbyrward@…


A recent update to Chrome 17 has caused the webui to timeout after several minutes. From what I can tell the problem is actually a bug in deluge where a json request 'web.get_events' never gets a response.

I don't fully understand this part of the code but my testing has found that returning a callback of None instead of continuing seems to keep Chrome connection alive and has no effect on receiving future plugin enabled events.

diff --git a/deluge/ui/web/ b/deluge/ui/web/
index 4bbcf9a..cb5e8fc 100644
--- a/deluge/ui/web/
+++ b/deluge/ui/web/
@@ -400,7 +400,8 @@ def _get_events(self, listener_id, count, d):
             if count >= 3000:
-                reactor.callLater(0.1, self._get_events, listener_id, count + 1, d)
+                d.callback(None)
+                #reactor.callLater(0.1, self._get_events, listener_id, count + 1, d)
     def remove_listener(self, listener_id, event):

Attachments (1)

fix-chrome-17.patch (2.3 KB) - added by bobbyrward 12 years ago.
Changes get_events to timeout after 5 seconds

Download all attachments as: .zip

Change History (5)

comment:1 Changed 12 years ago by damoxc


I'm sorry but that is a completely incorrect patch, that is how the web interface handles doing push notifications of events throughout the deluge system. The way it works is by opening a HTTP connection to the deluge-web webserver and then the server waits until either the connection times out or the server gets an event and returns the response. I'm not sure what you are experiencing but I'm afraid your patch simply removes functionality rather than solving anything. You'll have to give more information if you want to help resolve this issue.

comment:2 Changed 12 years ago by Cas

Someone has posted this issue with Google so if it is a Deluge issue and we fix it probably worth mentioning that there.

comment:3 Changed 12 years ago by bobbyrward

  • Cc bobbyrward@… added

If any XMLHttpRequest times out and abort is called on it, that request seems to use up one of the 6 available XMLHttpRequests for the page permanently.

That being said, I've been looking for someone else running into this problem with long polling and haven't been able to.

As a compromise, it would be possible to timeout get_events after something like 5 seconds.

Changed 12 years ago by bobbyrward

Changes get_events to timeout after 5 seconds

comment:4 Changed 12 years ago by Cas

  • Resolution set to fixed
  • Status changed from new to closed

Fixed 1.3-stable: 8db789ff

Note: See TracTickets for help on using tickets.