Skip to content

Commit 68a166f

Browse files
tanlethanhimolorhe
authored andcommitted
fix: prevent canceling one subscription from canceling all active subscriptions
- Add window-specific filtering to takeUntil operator in sendQueryRequest$ effect - Fixes cross-window cancellation issue where canceling one subscription would incorrectly cancel all active subscriptions - Only affects query/subscription requests, other operations remain unchanged
1 parent f349ca1 commit 68a166f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/altair-app/src/app/modules/altair/effects/query.effect.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,12 @@ export class QueryEffects {
359359
return result;
360360
}),
361361
takeUntil(
362-
this.actions$.pipe(ofType(queryActions.CANCEL_QUERY_REQUEST))
362+
this.actions$.pipe(
363+
ofType(queryActions.CANCEL_QUERY_REQUEST),
364+
filter((action: queryActions.CancelQueryRequestAction) =>
365+
action.windowId === response.windowId
366+
)
367+
)
363368
),
364369
catchError((error) => {
365370
let output =

0 commit comments

Comments
 (0)