mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53:25 +00:00
reload: Catch exceptions aborting pending AJAX requests.
It's probably a bug that this throws exceptions sometimes, but it's not consistently reproducible (or maybe, browser dependent?), and it isn't really a problem to fail to abort some requests as part of the page reload process; the abort was just there to make sure as little as possible is happening so we can garbage-collect effectively.
This commit is contained in:
@@ -145,7 +145,12 @@ function cleanup_before_reload() {
|
||||
$('*').off();
|
||||
|
||||
// Abort all pending ajax requests`
|
||||
try {
|
||||
channel.abort_all();
|
||||
} catch (ex) {
|
||||
// This seems to throw exceptions for no apparent reason sometimes
|
||||
blueslip.debug("Error aborting XHR requests on reload; ignoring");
|
||||
}
|
||||
|
||||
// Free all the DOM in the main_div
|
||||
$("#main_div").empty();
|
||||
|
||||
Reference in New Issue
Block a user