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

Refactor shared TCP Listener's resource manager scope usage #3182

Open
sukunrt opened this issue Feb 11, 2025 · 0 comments · May be fixed by #3186
Open

Refactor shared TCP Listener's resource manager scope usage #3182

sukunrt opened this issue Feb 11, 2025 · 0 comments · May be fixed by #3186

Comments

@sukunrt
Copy link
Member

sukunrt commented Feb 11, 2025

We've been bitten twice by the broken Scope handling for the shared TCP Listener: #3181 #3142

From: https://github.com/libp2p/go-libp2p/blob/master/p2p/transport/tcpreuse/listener.go#L198

// Bugs around multiple calls to OpenConnection or InterceptAccept are prevented by the transport
// integration tests.

This is clearly not true. So far, we've run into two configurations that we weren't testing for.

Intuitively, we want to pass the scope explicitly between the layers:
TCPReuse -> TCP -> Upgrader
TCPReuse -> WebSocket -> Upgrader

Currently TCPReuse sets up the Scope for the Upgrader but any wrapping done in the transports hides the Scope.

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

Successfully merging a pull request may close this issue.

1 participant