use exp backoff in bwu retry.

PiperOrigin-RevId: 372602204
This commit is contained in:
hai007
2021-05-07 12:07:05 -07:00
committed by Copybara-Service
parent f415ae3b8e
commit e664c1b4cc
3 changed files with 90 additions and 54 deletions
+6
View File
@@ -16,6 +16,7 @@
#define PLATFORM_BASE_FEATURE_FLAGS_H_
#include "absl/synchronization/mutex.h"
#include "absl/time/time.h"
namespace location {
namespace nearby {
@@ -37,6 +38,11 @@ class FeatureFlags {
// Keep Alive frame interval and timeout in millis.
std::int32_t keep_alive_interval_millis = 5000;
std::int32_t keep_alive_timeout_millis = 30000;
bool use_exp_backoff_in_bwu_retry = true;
// without the exp backoff, retry intervals in seconds: 5, 10, 10, 10...
// with the exp backoff, retry intervals in seconds: 3, 6, 12, 24...
absl::Duration bwu_retry_exp_backoff_initial_delay = absl::Seconds(3);
absl::Duration bwu_retry_exp_backoff_maximum_delay = absl::Seconds(300);
};
static const FeatureFlags& GetInstance() {