0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2025-01-14 00:34:18 +01:00

ircd::server: Add timestamp of when link's socket was estab.

This commit is contained in:
Jason Volk 2019-07-14 12:13:53 -07:00
parent fe0bffae98
commit 91af1a17fd
2 changed files with 2 additions and 0 deletions

View file

@ -29,6 +29,7 @@ struct ircd::server::link
server::peer *peer; ///< backreference to peer
std::shared_ptr<net::socket> socket; ///< link's socket
std::list<tag> queue; ///< link's work queue
time_t synack_ts {0L}; ///< time socket was estab
bool op_init {false}; ///< link is connecting
bool op_fini {false}; ///< link is disconnecting
bool op_open {false};

View file

@ -1786,6 +1786,7 @@ ircd::server::link::handle_open(std::exception_ptr eptr)
{
assert(op_init);
op_init = false;
synack_ts = time<seconds>();
if(!eptr && !op_fini)
wait_writable();