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:
parent
6fd1b23260
commit
a28c33645c
@ -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) {
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user