diff options
| author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-02-04 13:11:34 +0000 |
|---|---|---|
| committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-02-04 13:13:08 +0000 |
| commit | b81e276cab0e41b42b9272e9fed47e1534480b5c (patch) | |
| tree | 5b8e8bd98de733b408c3939e35580feed4b55af3 | |
| parent | ed67e5c001d50a2eea5fa24dfc58eba0921d525b (diff) | |
| download | monzero-core-b81e276cab0e41b42b9272e9fed47e1534480b5c.tar.gz monzero-core-b81e276cab0e41b42b9272e9fed47e1534480b5c.tar.xz monzero-core-b81e276cab0e41b42b9272e9fed47e1534480b5c.zip | |
connection_context: initialize m_last_request_time to current time
This prevents spurious early peer drops
| -rw-r--r-- | src/cryptonote_basic/connection_context.h | 2 |
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 { |
