]> Cypherpunks repositories - gostls13.git/commit
net: avoid Shutdown during Close
authorRuss Cox <rsc@golang.org>
Tue, 14 Feb 2012 05:40:37 +0000 (00:40 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 14 Feb 2012 05:40:37 +0000 (00:40 -0500)
commit5e4e3d8e4480756f0d5ace25e5d31b088067dc3d
tree9d60e74e19fc91eaf1afcb24d11cba278b21d188
parentb7360b9b066e38a42157f56fee174ad21be1dff2
net: avoid Shutdown during Close

Once we've evicted all the blocked I/O, the ref count
should go to zero quickly, so it should be safe to
postpone the close(2) until then.

Fixes #1898.
Fixes #2116.
Fixes #2122.

R=golang-dev, mikioh.mikioh, bradfitz, fullung, iant
CC=golang-dev
https://golang.org/cl/5649076
15 files changed:
src/pkg/net/dial_test.go
src/pkg/net/fd.go
src/pkg/net/fd_windows.go
src/pkg/net/net_test.go
src/pkg/net/sendfile_linux.go
src/pkg/net/sendfile_windows.go
src/pkg/net/server_test.go
src/pkg/net/sockopt.go
src/pkg/net/sockoptip.go
src/pkg/net/sockoptip_bsd.go
src/pkg/net/sockoptip_darwin.go
src/pkg/net/sockoptip_freebsd.go
src/pkg/net/sockoptip_linux.go
src/pkg/net/sockoptip_openbsd.go
src/pkg/net/sockoptip_windows.go