Skip to content

Conversation

@zivillian
Copy link
Contributor

Right now the connection might have been close and even the write to check if the connection is still alive may succeed. This change additionally polls the socket to make sure it's still usable.

Without this change we can reproduce the error when using the connection pool on a linux machine against go-carbon when there was no data transmitted for 5 minutes. It looks like there is a fixed timeout of 2 minutes for all connections to go-carbon. The connection check was successful but the subsequent write failed with:

System.IO.IOException: Unable to write data to the transport connection: Broken pipe.
 ---> System.Net.Sockets.SocketException (32): Broken pipe

which should have been detected by TestConnectionAsync.

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 this pull request may close these issues.

1 participant