Skip to content

Commit 9819a00

Browse files
authored
fix comsume_all when catch TimeoutError
1 parent a0bf13b commit 9819a00

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)