From 99b65ae9304d8cc04b1d6c72d59bcb8e8ad539cd Mon Sep 17 00:00:00 2001 From: Andy Pan Date: Thu, 4 Apr 2024 16:52:06 +0800 Subject: [PATCH] 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 Reviewed-by: Dmitri Shuralyov Reviewed-by: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI Auto-Submit: Dmitri Shuralyov --- src/net/tcpsock.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/net/tcpsock.go b/src/net/tcpsock.go index 68329fdc9a..701048896c 100644 --- a/src/net/tcpsock.go +++ b/src/net/tcpsock.go @@ -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 -- 2.48.1