You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
httpLink / httpBatchLink don't create their own AbortController, so unsubscribe doesn't cancel the request (same pattern as #7389) #7468
#7390 (closing #7389) fixed httpBatchStreamLink: it created its own AbortController and passed it into jsonlStreamConsumer, but the observable's cleanup was a // noop, so abortController.abort() never ran on unsubscribe and the JSONL stream kept consuming from the server after the subscriber disconnected.
I checked the other HTTP links and this same shape exists in two more:
httpLink.ts: passes signal: op.signal straight into universalRequester, no internal controller, cleanup is // noop.
httpBatchLink.ts: passes allAbortSignals(...batchOps.map(op => op.signal)), still only combining caller-provided per-op signals, no internal controller, cleanup is also // noop.
Compare with the links that already do this correctly: httpSubscriptionLink.ts and localLink.ts both do raceAbortSignals(op.signal, ac.signal) with their own ac = new AbortController(), and call ac.abort() in their cleanup. httpBatchStreamLink.ts now does the same after #7390.
So httpLink and httpBatchLink are the two remaining HTTP links that rely entirely on the caller supplying an op.signal that happens to fire on unsubscribe, instead of owning their own controller tied to the observable's lifecycle the way every other link in the package does. Whenever the caller's op.signal isn't already wired to this specific subscription's teardown, the underlying fetch outlives the subscriber — same wasted-bandwidth/dangling-request consequence as #7389, just without a streamed body to make it as visible in the network tab.
This issue has been locked because we are very unlikely to see comments on closed issues. If you are running into a similar issue, please create a new issue. Thank you.
Activity
SnowingFox commentedon Aug 13, 2026
Opened a PR to address this: #7469
fix(client): abort httpLink/httpBatchLink requests on unsubscribe
fix(client): abort httpLink/httpBatchLink requests on unsubscribe
fix(client): abort httpLink/httpBatchLink requests on unsubscribe (tr…
github-actions commentedon Sep 13, 2026
This issue has been locked because we are very unlikely to see comments on closed issues. If you are running into a similar issue, please create a new issue. Thank you.