Use debug logger package

Fix profile loading loop for expired profile same result
This commit is contained in:
2023-05-25 00:03:54 +01:00
parent 7b151e1b17
commit 2ccee7bd7c
13 changed files with 89 additions and 70 deletions

View File

@ -47,7 +47,7 @@ export class Connection {
cmd: ReqCommand,
cb: () => void
}> = [];
ActiveRequests: Set<string> = new Set();
ActiveRequests = new Set<string>();
Settings: RelaySettings;
Info?: RelayInfo;
@ -63,7 +63,7 @@ export class Connection {
OnConnected?: () => void;
OnEvent?: (sub: string, e: TaggedRawEvent) => void;
OnEose?: (sub: string) => void;
OnDisconnect?: (active: Array<string>, pending: Array<string>) => void;
OnDisconnect?: (id: string) => void;
Auth?: AuthHandler;
AwaitingAuth: Map<string, boolean>;
Authed = false;
@ -190,7 +190,7 @@ export class Connection {
this.ReconnectTimer = null;
}
this.OnDisconnect?.([...this.ActiveRequests], this.PendingRequests.map(a => a.cmd[1]))
this.OnDisconnect?.(this.Id);
this.#ResetQueues();
// reset connection Id on disconnect, for query-tracking
this.Id = uuid();