Skip to content

Commit

Permalink
Close EventSource before unloading the page (#11539)
Browse files Browse the repository at this point in the history
Should eliminate a error in the Firefox console regarding the connection
being interrupted while the page was loading.
  • Loading branch information
silverwind authored May 22, 2020
1 parent 88fe7b5 commit 6af13db
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions web_src/js/features/notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ export function initNotificationCount() {
source.close();
window.location.href = AppSubUrl;
});
window.addEventListener('beforeunload', () => {
source.close();
});
return;
}

Expand Down

0 comments on commit 6af13db

Please sign in to comment.