Skip to content

Commit ce086c0

Browse files
authored
fix(sse): signal aborted without reason another case (#28)
1 parent 8705f34 commit ce086c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/sse/source.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export class SSESource {
103103
({ promise: this.connected, resolve: this.#connected, reject: this.#connectionError } = Promise.withResolvers<
104104
void
105105
>());
106-
opts?.signal?.addEventListener('abort', () => this.#abortController.abort(), { once: true });
106+
opts?.signal?.addEventListener('abort', () => this.#abortController.abort(opts?.signal?.reason), { once: true });
107107
this.#input = input;
108108
this.#options = options;
109109
if (opts?.keepAliveTimeout) {

0 commit comments

Comments
 (0)