()
| 93 | // Track the abort listener so it can be removed if the Observable completes (as a memory |
| 94 | // optimization). |
| 95 | const onAbort = () => { |
| 96 | aborted = true; |
| 97 | sub?.unsubscribe(); |
| 98 | // Remove the listener immediately since unsubscribe won't trigger the subscription's |
| 99 | // error/complete handlers. This ensures the promise resolves and PendingTask is released. |
| 100 | params.abortSignal.removeEventListener('abort', onAbort); |
| 101 | // Resolve the promise with the current stream state if it hasn't been resolved yet. |
| 102 | // This ensures the PendingTask created for this request is released. |
| 103 | resolveOnce(); |
| 104 | }; |
| 105 | params.abortSignal.addEventListener('abort', onAbort); |
| 106 | |
| 107 | function send(value: ResourceStreamItem<T>): void { |
nothing calls this directly
no test coverage detected