diff options
author | alexvru <alexvru@ydb.tech> | 2023-06-19 09:11:57 +0300 |
---|---|---|
committer | alexvru <alexvru@ydb.tech> | 2023-06-19 09:11:57 +0300 |
commit | e426d3ae682b07eb973b3977b8d6c95360496f22 (patch) | |
tree | 7fe4ea6cc9969067ea6b3900bff02a7b97cc9ade /library | |
parent | 51c7cb325b1ce383ad934c6fe035d341239cd6e4 (diff) | |
download | ydb-e426d3ae682b07eb973b3977b8d6c95360496f22.tar.gz |
Randomize ping intervals a bit
Diffstat (limited to 'library')
-rw-r--r-- | library/cpp/actors/interconnect/interconnect_tcp_session.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/cpp/actors/interconnect/interconnect_tcp_session.cpp b/library/cpp/actors/interconnect/interconnect_tcp_session.cpp index 8767161e08..df972d21a0 100644 --- a/library/cpp/actors/interconnect/interconnect_tcp_session.cpp +++ b/library/cpp/actors/interconnect/interconnect_tcp_session.cpp @@ -712,6 +712,8 @@ namespace NActors { void TInterconnectSessionTCP::SetForcePacketTimestamp(TDuration period) { if (period != TDuration::Max()) { + // randomize period a bit + period = TDuration::FromValue(period.GetValue() - RandomNumber<ui64>(period.GetValue() / 10)); const TMonotonic when = TActivationContext::Monotonic() + period; if (when < ForcePacketTimestamp) { ForcePacketTimestamp = when; |