diff options
author | Devon H. O'Dell <devon.odell@gmail.com> | 2012-03-27 00:06:14 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2012-03-27 00:06:14 -0400 |
commit | a63c37b91e1483e10e073609a75e077ef1c6c827 (patch) | |
tree | 99e7162c1c2c7faa9d79c98fb1abd11f3f8047bc | |
parent | 4c2614c57c5e93431aef95490dd2de956ceb9967 (diff) | |
download | go-a63c37b91e1483e10e073609a75e077ef1c6c827.tar.gz go-a63c37b91e1483e10e073609a75e077ef1c6c827.zip |
net: ignore ECONNABORTED from syscall.Accept
Fixes #3395.
R=rsc, dsymonds
CC=golang-dev
https://golang.org/cl/5905063
-rw-r--r-- | src/pkg/net/fd.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pkg/net/fd.go b/src/pkg/net/fd.go index ae1bf2614a..76c953b9b4 100644 --- a/src/pkg/net/fd.go +++ b/src/pkg/net/fd.go @@ -623,6 +623,10 @@ func (fd *netFD) accept(toAddr func(syscall.Sockaddr) Addr) (netfd *netFD, err e 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} } |