mirror of https://github.com/zulip/zulip.git
Ignore long-poll successes with no data
The server will occationally return successfully with no data during a restart. Previously, when we would get such responses, the page would stop working because of JS errors. (imported from commit 39b89907dc5ae9a9eb54ebf60d0069281e401786)
This commit is contained in:
parent
9779ca9e5c
commit
fca4cade34
|
@ -646,6 +646,14 @@ function get_updates() {
|
|||
// minute to deal with crappy home wireless
|
||||
// routers that kill "inactive" http connections.
|
||||
success: function (data) {
|
||||
if (! data) {
|
||||
// The server occationally returns no data during a
|
||||
// restart. Ignore those responses so the page keeps
|
||||
// working
|
||||
get_updates_timeout = setTimeout(get_updates, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
get_updates_params.failures = 0;
|
||||
$('#connection-error').hide();
|
||||
|
||||
|
|
Loading…
Reference in New Issue