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
commit 8be2e8e527
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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 {