Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
reload: Replace setInterval with setTimeout.
Sahil Batra5ce7015cc8a3
diff --git a/static/js/reload.js b/static/js/reload.jsindex 50164861459..862f533f9ef 100644--- a/static/js/reload.js+++ b/static/js/reload.js@@ -246,10 +246,19 @@ function do_reload_app(send_after_reload, save_pointer, save_narrow, save_composblueslip.log("Retrying on-focus page reload");window.location.reload(true);});- setInterval(() => {++ function retry_reload() {+ // Schedule the next attempt to reload. This implementation+ // aims to simulate setInterval, which was used previously.+ //+ // See comment for get_full_presence_list_update in+ // activity.js for more details.+ setTimeout(retry_reload, 30000);+blueslip.log("Retrying page reload due to 30s timer");window.location.reload(true);- }, 30000);+ }+ setTimeout(retry_reload, 30000);try {server_events.cleanup_event_queue();