Skip to content

Commit 84e3e0a

Browse files
committed
Realtime streams fix waiting for streams to finished
1 parent 364ea56 commit 84e3e0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/core/src/v3/runMetadata/manager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ export class StandardMetadataManager implements RunMetadataManager {
250250
return streamInstance;
251251
} catch (error) {
252252
// Clean up metadata key if stream creation fails
253-
this.deleteKey(`$$stream.${key}`);
253+
this.removeFromKey(`$$streams`, key);
254254
throw error;
255255
}
256256
}
@@ -265,7 +265,7 @@ export class StandardMetadataManager implements RunMetadataManager {
265265
return;
266266
}
267267

268-
const promises = Array.from(this.activeStreams.values());
268+
const promises = Array.from(this.activeStreams.values()).map((stream) => stream.wait());
269269

270270
try {
271271
await Promise.race([

0 commit comments

Comments
 (0)