You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
asyncio leaks the socket/pipe in create_datagram_endpoint and connect_read_pipe/connect_write_pipe when transport creation fails #156400
BaseEventLoop.create_datagram_endpoint(), connect_read_pipe() and connect_write_pipe() create or take ownership of a socket/pipe and then run protocol_factory() and transport creation. The only cleanup on those methods (except: transport.close()) covers the later await waiter step, by which point the transport already owns the resource. If protocol_factory() or _make_*_transport() raises, the socket or pipe is never closed and leaks until garbage collection.
This is the same problem gh-153133 fixed for create_connection(); these three loop methods were not covered.
Activity
gh-156400: Close the socket or pipe when transport creation fails in …
pythongh-156400: Close the socket or pipe when transport creation fai…