mirror of
https://github.com/matrix-construct/construct
synced 2025-03-16 22:41:46 +01:00
ircd::server: Use system time for error time state.
This commit is contained in:
parent
b95c27826b
commit
7c92eb2757
2 changed files with 3 additions and 5 deletions
|
@ -115,12 +115,10 @@ struct ircd::server::peer
|
|||
struct ircd::server::peer::err
|
||||
{
|
||||
std::exception_ptr eptr;
|
||||
steady_point etime
|
||||
{
|
||||
now<steady_point>()
|
||||
};
|
||||
system_point etime;
|
||||
|
||||
err(std::exception_ptr eptr)
|
||||
:eptr{std::move(eptr)}
|
||||
,etime{now<system_point>()}
|
||||
{}
|
||||
};
|
||||
|
|
|
@ -436,7 +436,7 @@ ircd::server::peer::err_check()
|
|||
//TODO: The specific error type should be switched and finer
|
||||
//TODO: timeouts should be used depending on the error: i.e
|
||||
//TODO: NXDOMAIN vs. temporary conn timeout, etc.
|
||||
if(e->etime + seconds(error_clear_default) > now<steady_point>())
|
||||
if(e->etime + seconds(error_clear_default) > now<system_point>())
|
||||
return false;
|
||||
|
||||
err_clear();
|
||||
|
|
Loading…
Add table
Reference in a new issue