mirror of
https://github.com/matrix-construct/construct
synced 2024-11-17 23:40:57 +01:00
modules/s_dns_resolver: Use specific value for steady_point sentinel.
This commit is contained in:
parent
d19edbda98
commit
9ad3a0720c
2 changed files with 4 additions and 4 deletions
|
@ -255,7 +255,7 @@ ircd::net::dns::resolver::check_timeout(const uint16_t &id,
|
||||||
tag &tag,
|
tag &tag,
|
||||||
const steady_point &cutoff)
|
const steady_point &cutoff)
|
||||||
{
|
{
|
||||||
if(tag.last == steady_point{})
|
if(tag.last == steady_point::min())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if(tag.last > cutoff)
|
if(tag.last > cutoff)
|
||||||
|
@ -270,7 +270,7 @@ ircd::net::dns::resolver::check_timeout(const uint16_t &id,
|
||||||
host(tag.hp)
|
host(tag.hp)
|
||||||
};
|
};
|
||||||
|
|
||||||
tag.last = steady_point{};
|
tag.last = steady_point::min();
|
||||||
if(tag.tries < size_t(retry_max))
|
if(tag.tries < size_t(retry_max))
|
||||||
{
|
{
|
||||||
submit(tag);
|
submit(tag);
|
||||||
|
@ -551,7 +551,7 @@ try
|
||||||
}};
|
}};
|
||||||
|
|
||||||
assert(tag.tries > 0);
|
assert(tag.tries > 0);
|
||||||
tag.last = steady_point{};
|
tag.last = steady_point::min();
|
||||||
handle_reply(header, body, tag);
|
handle_reply(header, body, tag);
|
||||||
}
|
}
|
||||||
catch(const std::exception &e)
|
catch(const std::exception &e)
|
||||||
|
|
|
@ -74,7 +74,7 @@ struct ircd::net::dns::resolver::tag
|
||||||
dns::opts opts; // note: invalid after query sent
|
dns::opts opts; // note: invalid after query sent
|
||||||
const_buffer question;
|
const_buffer question;
|
||||||
callback cb;
|
callback cb;
|
||||||
steady_point last {};
|
steady_point last {steady_point::min()};
|
||||||
uint8_t tries {0};
|
uint8_t tries {0};
|
||||||
char hostbuf[256];
|
char hostbuf[256];
|
||||||
char qbuf[384];
|
char qbuf[384];
|
||||||
|
|
Loading…
Reference in a new issue