Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Klibs: syslog: improve DNS resolution of syslog server name
In case of failure to resolve the syslog server name, using a pure exponential backoff delay for retrying DNS resolution can cause logs to be shipped long after a previousy unresolvable server became resolvable. This commit puts a 1-minute limit to the backoff delay. The current code stops resolving the syslog server name after a successful resolution, and this can cause issues if the server IP address changes. To solve this problem, the dns_gethostbyname() function is now called even after the server name has been successfully resolved, so that when the cached DNS entry expires a new DNS request will be sent.
- Loading branch information