0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 10:12:39 +01:00

modules/s_dns: Condition response waiting on callback being non-null.

This commit is contained in:
Jason Volk 2019-03-25 14:06:10 -07:00
parent 8c27cb847a
commit 23785910b0

View file

@ -101,7 +101,9 @@ ircd::net::dns::resolve(const hostport &hp,
if(cache::get(hp, opts, cb))
return;
cache::waiting.emplace_back(hp, opts, std::move(cb));
if(cb)
cache::waiting.emplace_back(hp, opts, std::move(cb));
resolver_call(hp, opts);
}
@ -593,7 +595,7 @@ ircd::net::dns::cache::get(const hostport &hp,
return expired(rr, ts);
});
if(ret)
if(ret && closure)
closure(hp, rrs);
});