Skip to content

Commit af52fa2

Browse files
committed
Fix writer stop loop handle
1 parent 8c83b54 commit af52fa2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ydb/_topic_writer/topic_writer_asyncio.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,9 @@ async def _send_loop(self, writer: "WriterAsyncIOStream"):
537537
m = await self._new_messages.get() # type: InternalMessage
538538
if m.seq_no > last_seq_no:
539539
writer.write([m])
540+
except asyncio.CancelledError:
541+
# the loop task cancelled be parent code, for example for reconnection
542+
pass
540543
except BaseException as e:
541544
self._stop(e)
542545
raise

0 commit comments

Comments
 (0)