inrease ping pong threshold

This commit is contained in:
Valentin Balaschenko
2025-04-15 18:36:59 +01:00
parent 405f4613d8
commit 7463ea643f

View File

@@ -57,7 +57,7 @@ namespace {
std::chrono::milliseconds constexpr peerHighLatency{300}; std::chrono::milliseconds constexpr peerHighLatency{300};
/** How often we PING the peer to check for latency and sendq probe */ /** How often we PING the peer to check for latency and sendq probe */
std::chrono::seconds constexpr peerTimerInterval{60}; std::chrono::seconds constexpr peerTimerInterval{300};
} // namespace } // namespace
// TODO: Remove this exclusion once unit tests are added after the hotfix // TODO: Remove this exclusion once unit tests are added after the hotfix
@@ -604,7 +604,7 @@ PeerImp::fail(std::string const& reason)
return post( return post(
strand_, strand_,
std::bind( std::bind(
(void(Peer::*)(std::string const&)) & PeerImp::fail, (void (Peer::*)(std::string const&))&PeerImp::fail,
shared_from_this(), shared_from_this(),
reason)); reason));
if (journal_.active(beast::severities::kWarning) && socket_.is_open()) if (journal_.active(beast::severities::kWarning) && socket_.is_open())
@@ -1488,8 +1488,9 @@ PeerImp::onMessage(std::shared_ptr<protocol::TMProofPathRequest> const& m)
} }
else else
{ {
peer->send(std::make_shared<Message>( peer->send(
reply, protocol::mtPROOF_PATH_RESPONSE)); std::make_shared<Message>(
reply, protocol::mtPROOF_PATH_RESPONSE));
} }
} }
}); });
@@ -1543,8 +1544,9 @@ PeerImp::onMessage(std::shared_ptr<protocol::TMReplayDeltaRequest> const& m)
} }
else else
{ {
peer->send(std::make_shared<Message>( peer->send(
reply, protocol::mtREPLAY_DELTA_RESPONSE)); std::make_shared<Message>(
reply, protocol::mtREPLAY_DELTA_RESPONSE));
} }
} }
}); });