()
| 79 | // Track the abort listener so it can be removed if the Observable completes (as a memory |
| 80 | // optimization). |
| 81 | const onAbort = () => { |
| 82 | aborted = true; |
| 83 | sub?.unsubscribe(); |
| 84 | // Remove the listener immediately since unsubscribe won't trigger the subscription's |
| 85 | // error/complete handlers. This ensures the promise resolves and PendingTask is released. |
| 86 | params.abortSignal.removeEventListener('abort', onAbort); |
| 87 | // Resolve the promise with the current stream state if it hasn't been resolved yet. |
| 88 | // This ensures the PendingTask created for this request is released. |
| 89 | resolveOnce(); |
| 90 | }; |
| 91 | params.abortSignal.addEventListener('abort', onAbort); |
| 92 | |
| 93 | function send(value: ResourceStreamItem<T>): void { |
nothing calls this directly
no test coverage detected
searching dependent graphs…