0
0
Fork 0
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:
Jason Volk 2018-10-25 13:39:02 -07:00
parent d19edbda98
commit 9ad3a0720c
2 changed files with 4 additions and 4 deletions

View file

@ -255,7 +255,7 @@ ircd::net::dns::resolver::check_timeout(const uint16_t &id,
tag &tag,
const steady_point &cutoff)
{
if(tag.last == steady_point{})
if(tag.last == steady_point::min())
return false;
if(tag.last > cutoff)
@ -270,7 +270,7 @@ ircd::net::dns::resolver::check_timeout(const uint16_t &id,
host(tag.hp)
};
tag.last = steady_point{};
tag.last = steady_point::min();
if(tag.tries < size_t(retry_max))
{
submit(tag);
@ -551,7 +551,7 @@ try
}};
assert(tag.tries > 0);
tag.last = steady_point{};
tag.last = steady_point::min();
handle_reply(header, body, tag);
}
catch(const std::exception &e)

View file

@ -74,7 +74,7 @@ struct ircd::net::dns::resolver::tag
dns::opts opts; // note: invalid after query sent
const_buffer question;
callback cb;
steady_point last {};
steady_point last {steady_point::min()};
uint8_t tries {0};
char hostbuf[256];
char qbuf[384];