Skip to content

Commit b5db525

Browse files
committed
close the controller when signal aborts
1 parent a0c3963 commit b5db525

File tree

4 files changed

+5
-13
lines changed

4 files changed

+5
-13
lines changed

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@
181181
"@opentelemetry/sdk-trace-base": "2.0.1",
182182
"@opentelemetry/sdk-trace-node": "2.0.1",
183183
"@opentelemetry/semantic-conventions": "1.36.0",
184-
"@s2-dev/streamstore": "0.17.1",
184+
"@s2-dev/streamstore": "0.17.3",
185185
"dequal": "^2.0.3",
186186
"eventsource": "^3.0.5",
187187
"eventsource-parser": "^3.0.0",

packages/core/src/v3/realtimeStreams/streamInstance.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export class StreamInstance<T> implements StreamsWriter {
7777

7878
while (true) {
7979
if (self.options.signal?.aborted) {
80+
controller.close();
8081
break;
8182
}
8283

pnpm-lock.yaml

Lines changed: 2 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

references/realtime-streams/src/trigger/streams.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ const streamWriterTesterTask = task({
569569

570570
const chunks = [];
571571

572-
for await (const chunk of await streams.read(ctx.run.id, { timeoutInSeconds: 5 })) {
572+
for await (const chunk of await streams.read<string>(ctx.run.id, { timeoutInSeconds: 5 })) {
573573
chunks.push(chunk);
574574
}
575575

0 commit comments

Comments
 (0)