Skip to content

Commit 8b6a1f9

Browse files
committed
fix: comsume_all not catch asyncio.TimeoutError in python 3.10
1 parent a0bf13b commit 8b6a1f9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/a2a/server/events/event_consumer.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ async def consume_all(self) -> AsyncGenerator[Event]:
130130
except TimeoutError:
131131
# continue polling until there is a final event
132132
continue
133+
except asyncio.TimeoutError:
134+
# This class was made an alias of build-in TimeoutError after 3.11
135+
continue
133136
except QueueClosed:
134137
# Confirm that the queue is closed, e.g. we aren't on
135138
# python 3.12 and get a queue empty error on an open queue

0 commit comments

Comments
 (0)