]> Cypherpunks repositories - gostls13.git/commitdiff
net: update the doc for TCPConn.SetKeepAlivePeriod on Windows
authorAndy Pan <i@andypan.me>
Thu, 4 Apr 2024 08:52:06 +0000 (16:52 +0800)
committerGopher Robot <gobot@golang.org>
Thu, 4 Apr 2024 22:54:49 +0000 (22:54 +0000)
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>

src/net/tcpsock.go

index 68329fdc9a2592d9e9744ed425fa876384f5bec3..701048896c72a8bfd46e7fbd8ea8aa1a2544ac42 100644 (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