channel: Don't send outgoing HTTP requests during a reload.

This generalizes existing code for the presence code path that is
generically useful for avoiding useless work that will be discarded.

We make an exception for the one type of request that needs to happen
while reloading, namely the one to clean up our event queue.
This commit is contained in:
Tim Abbott
2020-02-13 15:26:34 -08:00
parent e2892a88c1
commit c2f132b8d5
4 changed files with 11 additions and 5 deletions

View File

@@ -308,11 +308,6 @@ function send_presence_to_server(want_redraw) {
// DEFAULT_EVENT_QUEUE_TIMEOUT_SECS).
server_events.check_for_unsuspend();
if (reload_state.is_in_progress()) {
blueslip.log("Skipping querying presence because reload in progress");
return;
}
channel.post({
url: '/json/users/me/presence',
data: {