-
Notifications
You must be signed in to change notification settings - Fork 349
Description
Follow-up to #132.
https://github.com/dotnet/corefx/issues/14237 was superseded by https://github.com/dotnet/corefx/issues/25040.
That introduced three new SocketOptionName options for .NET Core 3.0: TcpKeepAliveInterval, TcpKeepAliveRetryCount, TcpKeepAliveTime.
For .NET Core 3.0 (and above), the KeepAlive connection string option should be mapped to TcpKeepAliveTime.
TcpKeepAliveRetryCount can be left at the system-default value (Linux defaults to 9 and Vista and later is set to 10).
We currently pick 1000ms for the value of TcpKeepAliveInterval, which appears to be the system default on Windows (but not Linux, which uses 75s). It feels reasonable to close the connection after 9-10s, rather than waiting ~11 minutes, so shortening this by default seems good.