Implement Auto-reconnect after disconnection [2]

PiperOrigin-RevId: 689040466
This commit is contained in:
hai007
2024-10-23 11:30:32 -07:00
committed by Copybara-Service
parent ad2e6e3436
commit df6c4fadef
8 changed files with 287 additions and 177 deletions
+7 -4
View File
@@ -75,11 +75,14 @@ class FeatureFlags {
// auto-resume 5. non-distance-constraint-recovery 6. payload_ack
std::int32_t min_nc_version_supports_safe_to_disconnect = 1;
std::int32_t min_nc_version_supports_auto_reconnect = 3;
absl::Duration auto_reconnect_retry_delay_millis = absl::Milliseconds(5000);
absl::Duration auto_reconnect_timeout_millis = absl::Milliseconds(30000);
std::int32_t auto_reconnect_retry_attempts = 3;
absl::Duration auto_reconnect_skip_duplicated_endpoint_duration =
absl::Duration safe_to_disconnect_reconnect_retry_delay_millis =
absl::Milliseconds(4000);
absl::Duration safe_to_disconnect_reconnect_timeout_millis =
absl::Milliseconds(15000);
std::int32_t safe_to_disconnect_reconnect_retry_attempts = 3;
absl::Duration
safe_to_disconnect_reconnect_skip_duplicated_endpoint_duration =
absl::Milliseconds(2000);
// Android code won't be able to launch "payload_received_ack" feature for
// in near future, so change "payload_received_ack" version from "2" to "5"
// after auto-reconnect and auto-resume.