Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transport-manager: Race between dialing and canceling #276

Open
lexnv opened this issue Oct 28, 2024 · 0 comments
Open

transport-manager: Race between dialing and canceling #276

lexnv opened this issue Oct 28, 2024 · 0 comments

Comments

@lexnv
Copy link
Collaborator

lexnv commented Oct 28, 2024

In the transport manager we might end up with the following race-condition:

T0. we dial peer X on multiple protocols (State::Opening - outbound connection)
T1. peer X established inbound connection with us

T2. a future from T0 finishes and we'll receive the event at the next poll
T3. we cancel the opening futures started at T0

The impact of the race condition is that we will accept the established outbound connection if we have space for a secondary connection. This is happening regardless of the opening future being canceled, it might be completed before cancellation.

This is similar to the mem leak: #272

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant