Fixes #4369.
Remove the check for fd.sysfd < 0, the first line of fd.accept() tests if the fd is open correctly and will handle the fd being closed during accept.
R=dvyukov, bradfitz
CC=golang-dev
https://golang.org/cl/
6843076
// AcceptTCP accepts the next incoming call and returns the new connection
// and the remote address.
func (l *TCPListener) AcceptTCP() (c *TCPConn, err error) {
- if l == nil || l.fd == nil || l.fd.sysfd < 0 {
+ if l == nil || l.fd == nil {
return nil, syscall.EINVAL
}
fd, err := l.fd.accept(sockaddrToTCP)