Skip to content

Commit

Permalink
Merge pull request #16704 from lichess-org/schlawg-patch-1
Browse files Browse the repository at this point in the history
permalog out of order message versions
  • Loading branch information
ornicar authored Dec 31, 2024
2 parents 9643130 + a218005 commit edcc3d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ui/common/src/socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { idleTimer, browserTaskQueueMonitor } from './timing';
import { storage, once, type LichessStorage } from './storage';
import { pubsub, type PubsubEvent } from './pubsub';
import { myUserId } from './common';
import { log } from './permalog';

let siteSocket: WsSocket | undefined;

Expand Down Expand Up @@ -279,7 +280,7 @@ class WsSocket {
console.debug('version gap, retrying', m.v, this.version, retries);
setTimeout(() => this.handle(m, retries - 1), 200);
} else {
console.log('version gap, reloading');
log(`${this.lastUrl}: version mismatch incoming ${m.v} vs current ${this.version}`);
site.reload();
}
return;
Expand Down

0 comments on commit edcc3d4

Please sign in to comment.