Fix resetting

This commit is contained in:
Andras Schmelczer 2025-11-23 16:41:42 +00:00
parent d8058d396c
commit c94d732f24
11 changed files with 161 additions and 56 deletions

View file

@ -77,7 +77,7 @@ export class FetchController {
*/
public finishReset(): void {
if (!this.isResetting) {
throw new Error("Cannot finish reset when not resetting");
return;
}
this.isResetting = false;

View file

@ -21,13 +21,13 @@ export class WebSocketManager {
cursors: ClientCursors[]
) => Promise<void>)[] = [];
private webSocket: WebSocket | undefined;
private isStopped = true;
private resolveDisconnectingPromise: null | (() => unknown) = null;
private reconnectTimeoutId: ReturnType<typeof setTimeout> | undefined;
private readonly outstandingPromises: Promise<unknown>[] = [];
private webSocket: WebSocket | undefined;
private readonly webSocketFactoryImplementation: typeof globalThis.WebSocket;
public constructor(