1
0
mirror of https://github.com/golang/go synced 2024-11-25 02:07:58 -07:00

net: ignore ECONNABORTED from syscall.Accept

Fixes #3395.

R=rsc, dsymonds
CC=golang-dev
https://golang.org/cl/5905063
This commit is contained in:
Devon H. O'Dell 2012-03-27 00:06:14 -04:00 committed by Russ Cox
parent 4c2614c57c
commit a63c37b91e

View File

@ -623,6 +623,10 @@ func (fd *netFD) accept(toAddr func(syscall.Sockaddr) Addr) (netfd *netFD, err e
continue continue
} }
} }
} else if err == syscall.ECONNABORTED {
// This means that a socket on the listen queue was closed
// before we Accept()ed it; it's a silly error, so try again.
continue
} }
return nil, &OpError{"accept", fd.net, fd.laddr, err} return nil, &OpError{"accept", fd.net, fd.laddr, err}
} }