dns: fix dns query cache implementation

PR-URL: https://github.com/nodejs/node/pull/58404
Refs: https://github.com/nodejs/node/pull/57640
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
This commit is contained in:
Ethan Arrowood 2025-06-02 09:29:36 -06:00 committed by Antoine du Hamel
parent 6fd1b23260
commit a28c33645c
No known key found for this signature in database
GPG Key ID: 21D900FFDB233756
2 changed files with 4 additions and 4 deletions

View File

@ -879,9 +879,9 @@ void ChannelWrap::Setup() {
}
/* We do the call to ares_init_option for caller. */
const int optmask =
ARES_OPT_FLAGS | ARES_OPT_TIMEOUTMS |
ARES_OPT_SOCK_STATE_CB | ARES_OPT_TRIES;
const int optmask = ARES_OPT_FLAGS | ARES_OPT_TIMEOUTMS |
ARES_OPT_SOCK_STATE_CB | ARES_OPT_TRIES |
ARES_OPT_QUERY_CACHE;
r = ares_init_options(&channel_, &options, optmask);
if (r != ARES_SUCCESS) {

View File

@ -415,7 +415,7 @@ assert.throws(() => {
(answer) => Object.assign({ domain }, answer)
),
}), port, address);
}, cases.length * 2 - 1));
}, cases.length * 2));
server.bind(0, common.mustCall(() => {
const address = server.address();