Skip to content

Commit 1a4470b

Browse files
committed
fix: initialize promise resolvers for inflight message handling in TopicWriter
Signed-off-by: Vladislav Polyakov <polRk@ydb.tech>
1 parent bae0aed commit 1a4470b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/topic/src/writer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ export class TopicWriter<Payload = Uint8Array> implements Disposable, AsyncDispo
298298
try {
299299
// TODO: handle user errors (for example tx errors). Ex: use abort signal
300300
await retry(retryConfig, async () => {
301-
this.#inflight.clear(); // Clear in-flight messages at the start of the stream
301+
this.#initialized = Promise.withResolvers<void>();
302302

303303
using outgoing = new AsyncEventEmitter<StreamWriteMessage_FromClient>(this.#fromClientEmitter, 'message')
304304

0 commit comments

Comments
 (0)