mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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
This commit is contained in:
parent
b7360b9b06
commit
5e4e3d8e44
15 changed files with 440 additions and 200 deletions
|
|
@ -83,7 +83,7 @@ func connect(t *testing.T, network, addr string, isEmpty bool) {
|
|||
}
|
||||
|
||||
// Send explicit ending for unixpacket.
|
||||
// Older Linux kernels do stop reads on close.
|
||||
// Older Linux kernels do not stop reads on close.
|
||||
if network == "unixpacket" {
|
||||
fd.Write([]byte("END"))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue