From d43c0f80d80ff274d30e46fa3737deb8863d7094 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 6 Mar 2025 14:52:02 -0800 Subject: [PATCH] net: add comment about blocking to Conn.Close Fixes #18187 Change-Id: I3d0119838ddbfb99a067ba563e5d247f574ef841 Reviewed-on: https://go-review.googlesource.com/c/go/+/655517 Reviewed-by: Damien Neil LUCI-TryBot-Result: Go LUCI Reviewed-by: Ian Lance Taylor Auto-Submit: Ian Lance Taylor --- src/net/net.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/net/net.go b/src/net/net.go index 82dc222de1..917bef4d54 100644 --- a/src/net/net.go +++ b/src/net/net.go @@ -134,6 +134,8 @@ type Conn interface { // Close closes the connection. // Any blocked Read or Write operations will be unblocked and return errors. + // Close may or may not block until any buffered data is sent; + // for TCP connections see [*TCPConn.SetLinger]. Close() error // LocalAddr returns the local network address, if known. -- 2.50.0