Repository navigation
Conversation
_create_ssl_connection() creates TLSUpgradeProto inside
loop.create_connection(). When that call fails or is cancelled after the
protocol exists, the transport is closed and connection_lost(None) sets
ConnectionError('unexpected connection_lost() call') on on_data, which
nothing awaits any more, so asyncio logs "Future exception was never
retrieved". Since 0.32.0 the pool reaches this on its own: Pool.close()
cancels the floor-maintenance connect, and with an unresponsive server
the cancellation can land in that window.
Handle on_data the way __connect_addr() already handles the connected
future: cancel it, or retrieve its exception, when create_connection()
does not return.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1397.
_create_ssl_connection()createsTLSUpgradeProtoinsideloop.create_connection(). When that call fails or is cancelled after the protocol exists, the transport is closed andconnection_lost(None)setsConnectionError('unexpected connection_lost() call')onon_data, which nothing awaits any more, so asyncio logs "Future exception was never retrieved". Since 0.32.0Pool.close()cancels the floor-maintenance connect, so closing a pool while the server is unresponsive can log it.on_datais now cancelled, or its exception retrieved, whencreate_connection()does not return, the way__connect_addr()handles theconnectedfuture.test_connection_cancelled_during_transport_setupcoversssl='prefer'as well; it fails on master with the two unretrieved futures and passes with the change.