]> Cypherpunks repositories - gostls13.git/commit
net: set DNSError.IsTemporary from addrinfoErrno errors
authorMichael Vogt <mvo@ubuntu.com>
Wed, 1 May 2019 07:52:44 +0000 (07:52 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 1 May 2019 13:25:02 +0000 (13:25 +0000)
commit7ee22139796f8f4a7b588c444c6477a96acbc1ba
tree19cbe5a5f757f9ae03de50fefdc93a10fccfb115
parentba978f5fff69dcdc6ba651be2d2b53a96e939924
net: set DNSError.IsTemporary from addrinfoErrno errors

Today it is not possible (AFAICT) to detect if a DNSError if of type EAI_AGAIN, i.e. if it is something temporary that should be retried. This information is available inside addrinfoErrno but when the DNSError is created this information is lost.

This PR fixes this so that the addinfoErrno.Temporary information is added to DNSError as well. With that a user who gets a DNSError can check now is its a temporary error (for errors that resulted from a addrinfoErrno this is EAI_AGAIN).

Change-Id: I64badb2ebd904e41fc2e0755416f7f32560534d8
GitHub-Last-Rev: ced7238a6597039fb23f36f372bd1cf33d60d4a6
GitHub-Pull-Request: golang/go#31676
Reviewed-on: https://go-review.googlesource.com/c/go/+/174557
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/cgo_unix.go