aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-02-04 13:11:34 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-02-04 13:13:08 +0000
commitb81e276cab0e41b42b9272e9fed47e1534480b5c (patch)
tree5b8e8bd98de733b408c3939e35580feed4b55af3
parentMerge pull request #3198 (diff)
downloadmonero-b81e276cab0e41b42b9272e9fed47e1534480b5c.tar.xz
connection_context: initialize m_last_request_time to current time
This prevents spurious early peer drops
-rw-r--r--src/cryptonote_basic/connection_context.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptonote_basic/connection_context.h b/src/cryptonote_basic/connection_context.h
index 705af978a..5cd1709ab 100644
--- a/src/cryptonote_basic/connection_context.h
+++ b/src/cryptonote_basic/connection_context.h
@@ -40,7 +40,7 @@ namespace cryptonote
struct cryptonote_connection_context: public epee::net_utils::connection_context_base
{
cryptonote_connection_context(): m_state(state_before_handshake), m_remote_blockchain_height(0), m_last_response_height(0),
- m_callback_request_count(0), m_last_known_hash(crypto::null_hash) {}
+ m_last_request_time(boost::posix_time::microsec_clock::universal_time()), m_callback_request_count(0), m_last_known_hash(crypto::null_hash) {}
enum state
{