Opened 13 years ago
Closed 13 years ago
#2038 closed bug (Fixed)
Chrome 17 disconnecting from webui
Reported by: | Calum | Owned by: | Damien Churchill |
---|---|---|---|
Priority: | major | Milestone: | 1.3.4 |
Component: | Web UI | Version: | 1.3.3 |
Keywords: | Cc: | bobbyrward@gmail.com |
Description
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/json_api.py b/deluge/ui/web/json_api.py index 4bbcf9a..cb5e8fc 100644 --- a/deluge/ui/web/json_api.py +++ b/deluge/ui/web/json_api.py @@ -400,7 +400,8 @@ def _get_events(self, listener_id, count, d): if count >= 3000: d.callback(None) else: - 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)
Change History (5)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
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 by , 13 years ago
Cc: | 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.
by , 13 years ago
Attachment: | fix-chrome-17.patch added |
---|
Changes get_events to timeout after 5 seconds
Hi,
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.