diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-08-15 20:51:50 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-08-15 20:51:50 +0200 |
commit | 1d093eff67f0e5dc919f35ec42fa09c6d387a67e (patch) | |
tree | cb78eab4bac86f5f8684bb33812d3d9ff1d4665b /src | |
parent | Merge pull request #2272 (diff) | |
parent | cryptonote_protocol: fix recv/send idle time before handshake (diff) | |
download | monero-1d093eff67f0e5dc919f35ec42fa09c6d387a67e.tar.xz |
Merge pull request #2273
0e8d60c0 cryptonote_protocol: fix recv/send idle time before handshake (moneromooo-monero)
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptonote_protocol/cryptonote_protocol_handler.inl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl index 48ba963f2..06a5356fe 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl @@ -209,10 +209,10 @@ namespace cryptonote cnx.support_flags = support_flags; cnx.recv_count = cntxt.m_recv_cnt; - cnx.recv_idle_time = timestamp - cntxt.m_last_recv; + cnx.recv_idle_time = timestamp - std::max(cntxt.m_started, cntxt.m_last_recv); cnx.send_count = cntxt.m_send_cnt; - cnx.send_idle_time = timestamp - cntxt.m_last_send; + cnx.send_idle_time = timestamp - std::max(cntxt.m_started, cntxt.m_last_send); cnx.state = get_protocol_state_string(cntxt.m_state); |