Skip to content

test: keep TcpProxy forwarders tracked through socket cleanup #962

Description

@dkropachev

In TcpProxy._forward_loop(), the connection is removed from _connections before _close_pair() completes. Concurrent stop() or drop_connections() can therefore miss a still-running forwarder with open sockets, and active_connections briefly under-reports.

Keep the entry registered through socket cleanup and add a deterministic regression test.

Related: #948, #949.

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