We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b693903 commit 5b449b3Copy full SHA for 5b449b3
src/strands/experimental/bidi/agent/agent.py
@@ -395,11 +395,12 @@ async def run_outputs(inputs_task: asyncio.Task) -> None:
395
396
try:
397
await asyncio.gather(inputs_task, outputs_task)
398
- except (Exception, asyncio.CancelledError):
+ except (Exception, asyncio.CancelledError) as error:
399
inputs_task.cancel()
400
outputs_task.cancel()
401
await asyncio.gather(inputs_task, outputs_task, return_exceptions=True)
402
- raise
+ if not isinstance(error, asyncio.CancelledError):
403
+ raise
404
405
finally:
406
input_stops = [input_.stop for input_ in inputs if isinstance(input_, BidiInput)]
0 commit comments