mirror of https://github.com/c-ares/c-ares.git
UDP write may fail indicating host isn't reachable (#821)
UDP is connectionless, but systems use ICMP unreachable messages to indicate there is no ability to reach the host or port, which can result in a `send()` returning an error like `ECONNREFUSED`. We need to handle non-retryable codes like that to treat it as a connection failure so we requeue any queries on that connection to another connection/server immediately. Otherwise what happens is we just wait on the timeout to expire which can greatly increase the time required to get a definitive message. This also adds a test case to verify the behavior. Fixes #819 Fix By: Brad Houes (@bradh352)v1.29
parent
4e9b6f7806
commit
4f9ac6a4d0
2 changed files with 38 additions and 5 deletions
Loading…
Reference in new issue