0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-02 18:18:56 +02:00

ircd::server: Use system time for error time state.

This commit is contained in:
Jason Volk 2018-04-13 20:01:46 -07:00
parent b95c27826b
commit 7c92eb2757
2 changed files with 3 additions and 5 deletions

View file

@ -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>()}
{}
};

View file

@ -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();