Skip to content

Commit 9b132bd

Browse files
fix(gateway): clear completed session active runs
1 parent bd9e5c3 commit 9b132bd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/gateway/server-runtime-subscriptions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ export function startGatewayEventSubscriptions(params: {
4646
sessionEventSubscribers: params.sessionEventSubscribers,
4747
sessionMessageSubscribers: params.sessionMessageSubscribers,
4848
clearTrackedActiveRun: ({ runId, clientRunId }) => {
49-
for (const candidateRunId of new Set([runId, clientRunId])) {
49+
const candidateRunIds = runId === clientRunId ? [runId] : [runId, clientRunId];
50+
for (const candidateRunId of candidateRunIds) {
5051
const entry = params.chatAbortControllers.get(candidateRunId);
5152
// Chat abort entries can hold the requested key while chat run
5253
// state holds the canonical key; the run ids are the scoped match.

0 commit comments

Comments
 (0)