Skip to content

Conversation

@fabianfett
Copy link
Member

Motivation

When creating a connection, we wrongfully assumed that failedToCreateNewConnection will always be called before http*ConnectionClosed in the HTTPConnectionPoolStateMachine. However this is far from correct. In NIO Futures are fulfilled before ChannelHandler callbacks. Ordering in futures should not be assumed in such a complex project.

Change

We change the http*ConnectionClosed methods to be noops, if the connection is in the starting state. We instead wait for the failedToCreateNewConnection to create backoff timers and friends.

rdar://164674912

@fabianfett fabianfett added the 🔨 semver/patch No public API change. label Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants