]> Cypherpunks repositories - gostls13.git/commitdiff
net: add comment about blocking to Conn.Close
authorIan Lance Taylor <iant@golang.org>
Thu, 6 Mar 2025 22:52:02 +0000 (14:52 -0800)
committerGopher Robot <gobot@golang.org>
Thu, 6 Mar 2025 23:35:06 +0000 (15:35 -0800)
Fixes #18187

Change-Id: I3d0119838ddbfb99a067ba563e5d247f574ef841
Reviewed-on: https://go-review.googlesource.com/c/go/+/655517
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>

src/net/net.go

index 82dc222de1e75b3d4e92322acf2ecf2c4d1f3f57..917bef4d54861c1ee37b9c6f1a724abc6634d4c1 100644 (file)
@@ -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.