Delay storage service sync until empty

Co-authored-by: trevor-signal <131492920+trevor-signal@users.noreply.github.com>
This commit is contained in:
Fedor Indutny
2025-05-30 07:39:39 -07:00
committed by GitHub
parent 10f7e7e442
commit 8be2e8e527
6 changed files with 104 additions and 42 deletions

View File

@@ -879,6 +879,17 @@ export class SocketManager extends EventListener {
this.#incomingRequestQueue = [];
this.#authenticated = undefined;
this.#setAuthenticatedStatus({ status: SocketStatus.CLOSED });
for (const handlers of this.#requestHandlers) {
try {
handlers.handleDisconnect();
} catch (error) {
log.warn(
'SocketManager: got exception while handling disconnect, ' +
`error: ${Errors.toLogFormat(error)}`
);
}
}
}
#dropUnauthenticated(process: AbortableProcess<IWebSocketResource>): void {