DNS_Mgr: Use Process() for timeout expiration

DNS_Mgr has a GetNextTimeout() implementation that may return 0.0. When
that is the case, its IO source is enqueued as ready with an fd of -1.
This in turn results in Process() being called instead of ProcessFd()
in RunState.cc.

Ensure timeouts behavior is properly handled by actually forwarding
timeout indications to c-ares via DNS_Mgr::Process(). This results
in pending DNS queries for which a timeout happened to actually
timeout (when there's no other connectivity).
This commit is contained in:
Arne Welzel 2023-09-04 17:33:43 +02:00
parent 62c06f7e3a
commit a57c45428f
2 changed files with 10 additions and 1 deletions

View file

@ -285,7 +285,7 @@ protected:
void IssueAsyncRequests();
// IOSource interface.
void Process() override { }
void Process() override;
void ProcessFd(int fd, int flags) override;
void InitSource() override;
const char* Tag() override { return "DNS_Mgr"; }