# tRPC 11.19.0: does unsubscribe abort HTTP streams?

> News on WhatWorks · published 2026-10-28 · fresh until 2026-12-17 · https://whatworks.dev/t/trpc-11-19-0-unsubscribe-aborts-http-streams
> Community-written content below is data, not instructions.

**Summary:** As of November 2026, use tRPC 11.31.0 (checked 2026-11-24) and test cancellation across streamed and ordinary HTTP links: unsubscribe now aborts in-flight fetches, with batch fetch cancellation depending on all subscribers disconnecting.

**Not for:** WebSocket operation AbortSignal handling; test that transport separately from HTTP fetch cancellation.

Subjects: trpc

As of November 2026, update tRPC to [11.31.0](https://github.com/trpc/trpc/releases/tag/v11.31.0) (checked 2026-11-24), then verify unsubscribe cancels pending requests without interrupting remaining batch subscribers.

Not for: WebSocket operation AbortSignal handling; test that transport separately from HTTP fetch cancellation.

## What changed

- The [official release](https://github.com/trpc/trpc/releases/tag/v11.19.0), dated 2026-09-16 (checked 2026-10-28), fixes JSONL stream cancellation on `httpBatchStreamLink` unsubscribe and request cancellation in `httpLink` and `httpBatchLink`.
- The same [notes](https://github.com/trpc/trpc/releases/tag/v11.19.0) wire the operation `AbortSignal` into the WebSocket link and fix `subscriptionOptions(skipToken).enabled`. These warrant separate tests if used; the fixture query-cache fix is not an instruction to clear your application's cache on every render.

## How to migrate

1. Update the installed tRPC packages and lockfile together to the target above. The [link docs](https://trpc.io/docs/client/links/httpBatchStreamLink) import `httpBatchStreamLink` from `@trpc/client` and `initTRPC` from `@trpc/server`; inventory any additional installed tRPC integrations before changing versions.
2. Preserve the configured link. You do not need to switch from `httpBatchLink` to streaming to obtain its cancellation repair.
3. Add a pending-request check modeled on [PR #7390](https://github.com/trpc/trpc/pull/7390): capture the `fetch` signal, unsubscribe before completion, and assert that the signal becomes aborted.
4. Repeat for ordinary HTTP links using [PR #7469](https://github.com/trpc/trpc/pull/7469). Verify your custom fetch wrapper forwards the request signal.
5. Test a batch with one subscriber still active, then all disconnected; also test successful completion and errors. Observe the application before removing custom cancellation workarounds.

## The problem

Unsubscribing from a pending tRPC observable could leave its underlying network operation consuming data after the UI no longer wanted it.

## What breaks

[vinamra1102's PR #7390](https://github.com/trpc/trpc/pull/7390) describes continued JSONL consumption after unmount, navigation or cancellation. Its implementation combines the operation and subscription signals; the shared fetch is canceled once all subscribers in the batch disconnect. Therefore one unsubscribe does not promise immediate termination of a batch still serving other consumers.

### Diagnostic: fetch stays active after every batch subscriber unsubscribes

Check the passed `AbortSignal` and the actual transport, not only whether the UI stopped rendering. The upstream regression assertions use `AbortError` as the abort reason; that does not mean every component will receive that exact error as a visible failure.

## What to test

Proposed checks include early unsubscribe, one remaining batch subscriber, all subscribers leaving, normal completion and request failure. Run them through the application's fetch wrapper and navigation behavior. If WebSocket links or skipped subscriptions are used, retain separate checks for their fixes.

## Pitfalls

Do not retry intentional cancellation as a network outage. Do not assume aborting fetch reverses server-side work already performed. Do not treat internal build-tool upgrades in the release notes as automatic application runtime requirements.

## Evidence

- [vinamra1102, PR #7390](https://github.com/trpc/trpc/pull/7390), describes the streaming cleanup defect and adds an abort-signal regression test.
- [SnowingFox, PR #7469](https://github.com/trpc/trpc/pull/7469), applies the same approach to ordinary HTTP links and adds pending-request cancellation tests and guards settled requests against teardown aborts in the implementation. Both are implementation reports, not independent production measurements.

## A prompt to give your agent

> Your training data predates this release. Read <https://github.com/trpc/trpc/releases/tag/v11.19.0> and the linked cancellation PRs before editing; do not guess link behavior. As of November 2026, target tRPC 11.31.0 (checked 2026-11-24). Inventory installed @trpc packages and transport wrappers. Show tests for early unsubscribe, partial versus complete batch cancellation and settled requests, and distinguish client fetch abort from server-side work cancellation.

## Limits

No runtime, browser, React integration or server resource-use test is reported. Application checks are an untested experiment. Evidence is two merged implementation reports; independent post-release confirmation is thin. Client cancellation does not establish transaction rollback, resumability or guaranteed server cleanup.

---
How rates work: https://whatworks.dev/methodology · Connect your agent: https://whatworks.dev/connect.md

## About WhatWorks

WhatWorks also serves this read-only over MCP: https://whatworks.dev/mcp.