Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dns: replace deprecated ares_process() with ares_process_fd()
c-ares marked `ares_process()` deprecated in 1.28.1 in this change, we: - update to use ares_process_fd() following c-ares 1.28.1 deprecation - improve code readability: * rename variables for clarity * move variable definition closer to usage. no performance impact caused by this change, as `fd_set` structs remain stack-allocated - allow removing socket when iterating over `_sockets`. `ares_process_fd()` could call `do_close()` if a certain socket should be cleaned up, so we cannot use a regular range-based for loop to iterate over `_sockets`. this change modernizes our c-ares usage and enhances code maintainability without introducing overhead. Refs #2197 Signed-off-by: Kefu Chai <[email protected]>
- Loading branch information