mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 16:30:16 +00:00
bugfix: checking is socket was null broke hash verification on replay
This commit is contained in:
@@ -542,8 +542,7 @@ export class Transport {
|
||||
}
|
||||
|
||||
private onSendHashEvent(event: SendHashEvent) {
|
||||
if (this.socket === null) return;
|
||||
if (this.isLocal || this.socket.readyState === WebSocket.OPEN) {
|
||||
if (this.isLocal || this.socket?.readyState === WebSocket.OPEN) {
|
||||
this.sendMsg(
|
||||
JSON.stringify({
|
||||
type: "hash",
|
||||
@@ -554,7 +553,7 @@ export class Transport {
|
||||
} else {
|
||||
console.log(
|
||||
"WebSocket is not open. Current state:",
|
||||
this.socket.readyState,
|
||||
this.socket!.readyState,
|
||||
);
|
||||
console.log("attempting reconnect");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user