{master} close WS on reload

prevents new WS events from triggering more reloads
pull/6529/head
Thibault Duplessis 2020-04-30 15:37:49 -06:00
parent cba3207173
commit 1159af4428
1 changed files with 1 additions and 0 deletions

View File

@ -360,6 +360,7 @@ lichess.redirect = function(obj) {
lichess.reload = function() {
if (lichess.redirectInProgress) return;
lichess.hasToReload = true;
lichess.socket.destroy();
if (location.hash) location.reload();
else location.href = location.href;
};