From a63c37b91e1483e10e073609a75e077ef1c6c827 Mon Sep 17 00:00:00 2001 From: "Devon H. O'Dell" Date: Tue, 27 Mar 2012 00:06:14 -0400 Subject: [PATCH] net: ignore ECONNABORTED from syscall.Accept Fixes #3395. R=rsc, dsymonds CC=golang-dev https://golang.org/cl/5905063 --- src/pkg/net/fd.go | 4 ++++ 1 file changed, 4 insertions(+) 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} }