diff options
author | Howard Chu <hyc@symas.com> | 2017-06-04 22:37:53 +0100 |
---|---|---|
committer | Howard Chu <hyc@symas.com> | 2017-06-15 16:54:03 +0100 |
commit | 07c4276cbebe453f552dd107a72d7231579dea57 (patch) | |
tree | 3fe8ef7ef34c029083d0fb7bb0f80d850ad5216d /contrib | |
parent | Don't timeout a slow operation that's making progress (diff) | |
download | monero-07c4276cbebe453f552dd107a72d7231579dea57.tar.xz |
Don't issue a new timedsync while one is already in progress
A timedsync is issued every minute on a connection, but the input
tineout is 2 minutes. This means a new sync request could be issued
while a slow sync request was already in progress. The additional
request will further clog the network on a slow connection, and
cause a premature timeout.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/epee/include/net/net_utils_base.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/epee/include/net/net_utils_base.h b/contrib/epee/include/net/net_utils_base.h index 4334029f7..fd7e28849 100644 --- a/contrib/epee/include/net/net_utils_base.h +++ b/contrib/epee/include/net/net_utils_base.h @@ -56,6 +56,7 @@ namespace net_utils const uint32_t m_remote_port; const bool m_is_income; const time_t m_started; + bool m_in_timedsync; time_t m_last_recv; time_t m_last_send; uint64_t m_recv_cnt; @@ -72,6 +73,7 @@ namespace net_utils m_remote_port(remote_port), m_is_income(is_income), m_started(time(NULL)), + m_in_timedsync(false), m_last_recv(last_recv), m_last_send(last_send), m_recv_cnt(recv_cnt), @@ -85,6 +87,7 @@ namespace net_utils m_remote_port(0), m_is_income(false), m_started(time(NULL)), + m_in_timedsync(false), m_last_recv(0), m_last_send(0), m_recv_cnt(0), |