net: ignore ECONNABORTED from syscall.Accept
Fixes #3395.
R=rsc, dsymonds
CC=golang-dev
https://golang.org/cl/5905063
diff --git a/src/pkg/net/fd.go b/src/pkg/net/fd.go
index ae1bf26..76c953b 100644
--- a/src/pkg/net/fd.go
+++ b/src/pkg/net/fd.go
@@ -623,6 +623,10 @@
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}
}