net: limit concurrent threads to limit on file descriptors
At least on Darwin, if getaddrinfo can't open a file descriptor it returns EAI_NONAME ("no such host") rather than a meaningful error. Limit the number of concurrent getaddrinfo calls to the number of file descriptors we can open, to make that meaningless error less likely. We don't apply the same limit to Go lookups, because for that we will return a meaningful "too many open files" error. Fixes #25694 Change-Id: I601857190aeb64f11e22b4a834c1c6a722a0788d Reviewed-on: https://go-review.googlesource.com/121176Reviewed-by: Bryan C. Mills <bcmills@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Showing
Please
register
or
sign in
to comment