mirror of https://github.com/zulip/zulip.git
Ensure that restarting get_events does spawn more than one get_events request
Aborting a xhr actually calls the error callback, which was restarting the get_events loop, and we were also restarting it manually in restart_get_updates. (imported from commit dcdb4a27539ce35ecd83c2ade5b4edca3fb848e1)
This commit is contained in:
parent
d3579c57ec
commit
4d7b351b07
|
@ -981,7 +981,10 @@ function get_updates(options) {
|
|||
reload.initiate({immediate: true});
|
||||
}
|
||||
|
||||
if (error_type === 'timeout') {
|
||||
if (error_type === 'abort') {
|
||||
// Don't restart if we explicitly aborted
|
||||
return;
|
||||
} else if (error_type === 'timeout') {
|
||||
// Retry indefinitely on timeout.
|
||||
get_updates_failures = 0;
|
||||
$('#connection-error').hide();
|
||||
|
|
Loading…
Reference in New Issue