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:
Zev Benjamin 2013-11-14 14:06:02 -05:00
parent d3579c57ec
commit 4d7b351b07
1 changed files with 4 additions and 1 deletions

View File

@ -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();