From: Andy Pan Date: Thu, 4 Apr 2024 08:52:06 +0000 (+0800) Subject: net: update the doc for TCPConn.SetKeepAlivePeriod on Windows X-Git-Tag: go1.23rc1~687 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=99b65ae9304d8cc04b1d6c72d59bcb8e8ad539cd;p=gostls13.git 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 --- 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