mirror of
https://github.com/golang/go
synced 2024-11-12 09:20:22 -07:00
net: fix close of Listener
Fixes #1375. R=rsc, r CC=golang-dev https://golang.org/cl/3731048
This commit is contained in:
parent
bf453eba90
commit
ed1cbca81f
@ -567,6 +567,10 @@ func (fd *netFD) accept(toAddr func(syscall.Sockaddr) Addr) (nfd *netFD, err os.
|
||||
var s, e int
|
||||
var sa syscall.Sockaddr
|
||||
for {
|
||||
if fd.closing {
|
||||
syscall.ForkLock.RUnlock()
|
||||
return nil, os.EINVAL
|
||||
}
|
||||
s, sa, e = syscall.Accept(fd.sysfd)
|
||||
if e != syscall.EAGAIN {
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user