[Bugfix] Preserve cancellation in duplex session control queues (#7782)

Signed-off-by: wuli666 <421774554@qq.com>
This commit is contained in:
wuli666 authored and GitHub committed 2026-09-23 19:32:40 +00:00
1 parent 5e6b9047c9
commit 6daf5b30f0
2 files changed
+44 -4

No files matched your search

+3 -4
View File
@@ -214,10 +214,9 @@ class DuplexSessionManager:
async def run_ordered() -> None:
if predecessor is not None:
try:
await predecessor
except BaseException:
pass
# A predecessor's failure/cancellation must not poison the queue.
# Cancelling this task still cancels the gather and propagates.
await asyncio.gather(predecessor, return_exceptions=True)
await operation()
task = asyncio.create_task(run_ordered(), name=name)