Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PhysicalBridge: Fix orphaning cases of PhysicalConnection where it ne…
…ver finishes (#2338) What happens here is that `PhysicalConnection` attempts to connect but never hears back, so it's stuck in `State.ConnectedEstablishing` state, which is handled in the heartbeat code. In the situation where the "last write seconds ago" passes in the heartbeat and we haven't heard back, we fire an `PhysicalBridge.OnDisconnected()` which clears out `physical` and orphans the socket listening forever. This now properly disposes of that `PhysicalConnection` mirroring like we do in `State.Connecting` which will properly fire `OnDisconnected()` and clean up the orphan socket. The situation manifests where we establish a TCP connection, but not a Redis connection. All of the cases in the memory dump we're analyzing are some bytes sent and 0 received. Likely a Redis server issue, but the client is then handling it incorrectly and leaking. I nuked the unused `RemovePhysical` method just to prevent further oops here. Addresses a new case of #1458.
- Loading branch information