Skip to content

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

Open
@sukunrt

Description

@sukunrt

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions