Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement KeepAlive for non-Windows systems #746

Closed
bgrainger opened this issue Dec 5, 2019 · 1 comment
Closed

Implement KeepAlive for non-Windows systems #746

bgrainger opened this issue Dec 5, 2019 · 1 comment
Milestone

Comments

@bgrainger
Copy link
Member

@bgrainger bgrainger commented Dec 5, 2019

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.

@bgrainger bgrainger added this to the 1.0 milestone Dec 5, 2019
@bgrainger
Copy link
Member Author

@bgrainger bgrainger commented Mar 7, 2020

Added in 0.62.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant