Skip to content

Commit 9d33b0b

Browse files
steipeteampagent
andauthored
1 parent 0933263 commit 9d33b0b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/gateway/session-sharing.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ export function resolveSessionMutationAuthorization(params: {
440440
storeCache: GatewaySessionStoreCache;
441441
targetDiscoveryCache: GatewaySessionStoreDiscoveryCache;
442442
} => ({ storeCache: new Map(), targetDiscoveryCache: new Map() });
443-
const lookupCaches = createLookupCaches();
443+
let lookupCaches: ReturnType<typeof createLookupCaches> | undefined;
444444
const resolveAuthorizedTarget = (
445445
targetRef: SessionMutationTarget,
446446
): { target: SessionSharingTarget | null } | { error: ErrorShape } => {
@@ -450,7 +450,7 @@ export function resolveSessionMutationAuthorization(params: {
450450
cfg: getCfg(),
451451
sessionKey: targetRef.sessionKey,
452452
agentId: targetRef.agentId,
453-
...lookupCaches,
453+
...(lookupCaches ??= createLookupCaches()),
454454
}),
455455
};
456456
} catch (error) {

0 commit comments

Comments
 (0)