1
0
mirror of https://github.com/golang/go synced 2024-07-08 12:18:55 +00:00

net: update the doc for TCPConn.SetKeepAlivePeriod on Windows

The method comment of TCPConn.SetKeepAlivePeriod had become
obsolete and inaccurate since CL 565495 and CL 570077 were merged.

For #65817

Change-Id: Ide99b2949676d452a505ba6fd634088f05c9df44
Reviewed-on: https://go-review.googlesource.com/c/go/+/576435
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
This commit is contained in:
Andy Pan 2024-04-04 16:52:06 +08:00 committed by Gopher Robot
parent 7e9894449e
commit 99b65ae930

View File

@ -241,8 +241,8 @@ func (c *TCPConn) SetKeepAlive(keepalive bool) error {
// SetKeepAlivePeriod sets the duration the connection needs to
// remain idle before TCP starts sending keepalive probes.
//
// Note that calling this method on Windows will reset the KeepAliveInterval
// to the default system value, which is normally 1 second.
// Note that calling this method on Windows prior to Windows 10 version 1709
// will reset the KeepAliveInterval to the default system value, which is normally 1 second.
func (c *TCPConn) SetKeepAlivePeriod(d time.Duration) error {
if !c.ok() {
return syscall.EINVAL