Skip to content

Commit 8b858c1

Browse files
Copilotowndev
andcommitted
Fix: Use client.aio.aclose() instead of client.aclose() for async cleanup
Co-authored-by: owndev <69784886+owndev@users.noreply.github.com>
1 parent 11fff7f commit 8b858c1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pipelines/google/google_gemini.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1621,7 +1621,7 @@ async def _handle_streaming_response_with_cleanup(
16211621
finally:
16221622
# Ensure client is properly closed after streaming completes
16231623
try:
1624-
await client.aclose()
1624+
await client.aio.aclose()
16251625
self.log.debug("Streaming client closed successfully")
16261626
except Exception as close_error:
16271627
self.log.warning(f"Error closing streaming client: {close_error}")
@@ -2210,7 +2210,7 @@ async def get_response():
22102210
# Ensure client is properly closed for non-streaming responses
22112211
if not stream or supports_image_generation:
22122212
try:
2213-
await client.aclose()
2213+
await client.aio.aclose()
22142214
self.log.debug(
22152215
f"Request {request_id}: Client closed successfully"
22162216
)

0 commit comments

Comments
 (0)