cpython/Misc/NEWS.d/next/Library/2024-01-03-14-19-26.gh-issu...

6 lines
320 B
ReStructuredText

In :meth:`asyncio.StreamReaderProtocol.connection_made`, there is callback
that logs an error if the task wrapping the "connected callback" fails. This
callback would itself fail if the task was cancelled. Prevent this by
checking whether the task was cancelled first. If so, close the transport
but don't log an error.