From 6dc54989220aafe6c74a3ef4ab57978b75e7e859 Mon Sep 17 00:00:00 2001 From: Tim Disney Date: Fri, 8 May 2026 12:47:21 -0700 Subject: [PATCH] fix lane issue --- src/lanes.ts | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/lanes.ts b/src/lanes.ts index 28cfb15..e267f10 100644 --- a/src/lanes.ts +++ b/src/lanes.ts @@ -36,15 +36,18 @@ export class LaneManager { const inflight = this.creating.get(key); if (inflight) return inflight; const promise = (async () => { - const session = await createSession( - this.deps, - { defaultDestination: key, defaultUserId: userId }, - this.client - ); - const lane: Lane = { session }; - this.lanes.set(key, lane); - this.creating.delete(key); - return lane; + try { + const session = await createSession( + this.deps, + { defaultDestination: key, defaultUserId: userId }, + this.client + ); + const lane: Lane = { session }; + this.lanes.set(key, lane); + return lane; + } finally { + this.creating.delete(key); + } })(); this.creating.set(key, promise); return promise; -- 2.51.2