aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2020-12-30 14:14:52 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2020-12-30 14:21:57 +0000
commit00253b717cd29c98a471212d08df671c9beba40c (patch)
treeacffd950378eb1ea3c1d35cd311515f6b42e7fc8 /src
parentMerge pull request #7222 (diff)
downloadmonero-00253b717cd29c98a471212d08df671c9beba40c.tar.xz
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
Diffstat (limited to 'src')
-rw-r--r--src/cryptonote_protocol/cryptonote_protocol_handler.inl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl
index c76e5628d..732a6d118 100644
--- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl
+++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl
@@ -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();