diff options
| author | Weixie Cui <cuiweixie@gmail.com> | 2026-04-09 13:27:45 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2026-04-10 10:49:38 -0700 |
| commit | 27c0ad865c944a7c7c637fd0f97f48a422ca6fae (patch) | |
| tree | 313465a44726f752c9a480ef87f368dd4e44c2d3 | |
| parent | 4478774aa2b1069774c274ebc2ee2ae029030b0f (diff) | |
| download | go-27c0ad865c944a7c7c637fd0f97f48a422ca6fae.tar.xz | |
net: should close the netfd not listen fd
Change-Id: I58e4ca136df73cd79ae2bcc7794c867d2e53261b
GitHub-Last-Rev: 5381773704ba35819e5c723525ee3428c939b582
GitHub-Pull-Request: golang/go#78607
Reviewed-on: https://go-review.googlesource.com/c/go/+/764363
Reviewed-by: Nicholas Husin <nsh@golang.org>
Auto-Submit: Nicholas Husin <nsh@golang.org>
Reviewed-by: Nicholas Husin <husin@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
| -rw-r--r-- | src/net/fd_windows.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/fd_windows.go b/src/net/fd_windows.go index 8568879602..5171dcaa23 100644 --- a/src/net/fd_windows.go +++ b/src/net/fd_windows.go @@ -212,7 +212,7 @@ func (fd *netFD) accept() (*netFD, error) { // Associate our new socket with IOCP. netfd := newFD(s, fd.family, fd.sotype, fd.net) if err := netfd.init(); err != nil { - fd.Close() + netfd.Close() return nil, err } |
