From 2fbabcaecdaac2f21864b08437e91dfd8b33708e Mon Sep 17 00:00:00 2001 From: evanpelle Date: Tue, 3 Jun 2025 17:34:19 -0700 Subject: [PATCH] bugfix: checking is socket was null broke hash verification on replay --- src/client/Transport.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/client/Transport.ts b/src/client/Transport.ts index 7d85ae931..ab06dc938 100644 --- a/src/client/Transport.ts +++ b/src/client/Transport.ts @@ -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"); }