Comment clarity
This commit is contained in:
parent
2ab78660d4
commit
20c5c6bfa9
@ -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()
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user