-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
net: use the same default TCPKeepAlive interval in net.Listen and net.Dial #31510
Comments
Does |
Yeah, this is not in net/http as of 1abf3aa. The |
Yeah, but the net.Listen default is 3m because 1abf3aa lifted the default out of ListenAndServe and into net.Listen. This is orthogonal though to the point that these two defaults (in net.Listen and net.Dial) should be the same for consistency. |
Changed the title accordingly. release-blocker because the net.Listen keep-alive is new, so we should decide if we are changing it before shipping it, ideally. |
Are there specific concerns against the approach outlined above?
If there are none, I'll go ahead and send a CL. |
I can't see why these should be different. Go ahead and send a CL. |
Change https://golang.org/cl/175259 mentions this issue: |
In #23378 (comment) we noted that there is a mismatch between the default TCP keepalive used by
net.Listen
(3m, previously inhttp.ListenAndServe(TLS)
) and the one used bynet.Dial
(15s).For uniformity, it would be advisable to ensure these two defaults match.
If there are no counter-proposals, my suggestion would be to use 15s as the interval (see #23459 for prior discussion).
An explicit non-goal of this issue is that of making the default value part of the API. For the reasons discussed in https://go-review.googlesource.com/c/go/+/107196 this should remain undefined, and users that have specific requirements in terms of exact keepalive durations should specify a custom configuration.
The text was updated successfully, but these errors were encountered: