mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
net, os: don't wait for Close in blocking mode
Updates #7970 Updates #21856 Updates #23111 Change-Id: I0cd0151fcca740c40c3c976f941b04e98e67b0bf Reviewed-on: https://go-review.googlesource.com/83715 Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
parent
d0b2467966
commit
0f3ab149ec
4 changed files with 93 additions and 4 deletions
|
|
@ -66,7 +66,7 @@ func (f *File) Fd() uintptr {
|
|||
// opened in blocking mode. The File will continue to work,
|
||||
// but any blocking operation will tie up a thread.
|
||||
if f.nonblock {
|
||||
syscall.SetNonblock(f.pfd.Sysfd, false)
|
||||
f.pfd.SetBlocking()
|
||||
}
|
||||
|
||||
return uintptr(f.pfd.Sysfd)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue