Skip to content

Commit 3286e36

Browse files
committed
Revert fix, let's see
1 parent aecfead commit 3286e36

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

src/a2a/server/request_handlers/request_handler.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -241,17 +241,8 @@ async def async_gen_wrapper(
241241
) -> Any:
242242
if params is not None:
243243
validate_proto_required_fields(params)
244-
# Explicitly close the inner async generator in a finally block
245-
# so that its cleanup (except/finally) runs deterministically
246-
# during aclose(). On Python < 3.13, async-for does NOT call
247-
# aclose() on the iterator when an exception (e.g. GeneratorExit)
248-
# propagates through the loop body, leaving cleanup to the GC.
249-
inner = method(self, params, context, *args, **kwargs)
250-
try:
251-
async for item in inner:
252-
yield item
253-
finally:
254-
await inner.aclose()
244+
async for item in method(self, params, context, *args, **kwargs):
245+
yield item
255246

256247
return async_gen_wrapper
257248

0 commit comments

Comments
 (0)