protocol: don't reset last request time on an idle timer

this prevents losing time of "idle time" for a peer, which could
otherwise be reset by another timed sync command from the peer
remotes/1691602464505633909/tmp_refs/heads/wonerujo-v0.10.1
moneromooo-monero 3 years ago
parent 36dfd41e01
commit 00253b717c
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3

@ -137,7 +137,7 @@ namespace cryptonote
CHECK_AND_ASSERT_MES_CC( context.m_callback_request_count > 0, false, "false callback fired, but context.m_callback_request_count=" << context.m_callback_request_count);
--context.m_callback_request_count;
if(context.m_state == cryptonote_connection_context::state_synchronizing)
if(context.m_state == cryptonote_connection_context::state_synchronizing && context.m_last_request_time == boost::posix_time::not_a_date_time)
{
NOTIFY_REQUEST_CHAIN::request r = {};
context.m_needed_objects.clear();

Loading…
Cancel
Save