From 20c5c6bfa972d34ece5a8270f4980db9c293482f Mon Sep 17 00:00:00 2001 From: Noah Stapp Date: Mon, 18 May 2026 11:38:22 -0400 Subject: [PATCH] Comment clarity --- pymongo/pool_shared.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pymongo/pool_shared.py b/pymongo/pool_shared.py index ebb84c3f8..1ad84478d 100644 --- a/pymongo/pool_shared.py +++ b/pymongo/pool_shared.py @@ -360,9 +360,10 @@ async def _configured_protocol_interface( return AsyncNetworkingInterface((transport, protocol)) finally: - # If cancellation or any exception lands between sock creation and + # If cancellation or any exception lands between socket creation and # transport adoption, asyncio.create_connection has not registered - # cleanup for the sock — close it ourselves so it doesn't leak. + # cleanup for the sock. + # Close it ourselves to prevent leaks. if not sock_adopted: sock.close()