Skip to content

Evict broken connections from the pool

Pavlo Strokov requested to merge ps-pool-of-healthy-conns into master

Connection opened to the remote remains unusable if remote restarts. But this connection leaves in the pool until restart.
To deal with that problem we track the state of the connection that is sitting in the pool. If connection is in TransientFailure or Shutdown state it is evicted from the cache and a new attempt issued to dial with the remote.
We also need to use FailOnNonTempDialError dial option in combination with Block option to identify if remote is ready to accept connection and if connection address is valid and not block indefinite on Dial if there is no remote listening on that address.

Closes: #2948 (closed)

Edited by Pavlo Strokov

Merge request reports