diff --git a/src/room/Room.ts b/src/room/Room.ts index 8a0bd97619..922f79b757 100644 --- a/src/room/Room.ts +++ b/src/room/Room.ts @@ -783,7 +783,9 @@ class Room extends (EventEmitter as new () => TypedEmitter) this.log.warn('abort connection attempt', this.logContext); this.abortController?.abort(); // in case the abort controller didn't manage to cancel the connection attempt, reject the connect promise explicitly - this.connectFuture?.reject?.(new ConnectionError('Client initiated disconnect')); + this.connectFuture?.reject?.( + new ConnectionError('Client initiated disconnect', ConnectionErrorReason.Cancelled), + ); this.connectFuture = undefined; } // send leave