Index: google_apis/gcm/gcm_client_impl.cc |
diff --git a/google_apis/gcm/gcm_client_impl.cc b/google_apis/gcm/gcm_client_impl.cc |
index 14a94687a923d5672cf583caf1aefd8a94183a86..3100e71e029d677c85e8d448ff43d38af437c7c5 100644 |
--- a/google_apis/gcm/gcm_client_impl.cc |
+++ b/google_apis/gcm/gcm_client_impl.cc |
@@ -27,8 +27,10 @@ namespace gcm { |
namespace { |
-// Backoff policy. Shared across reconnection logic and checkin/registration |
+// Backoff policy. Shared across reconnection logic and checkin/(un)registration |
// retries. |
+// Note: In order to ensure a minimum of 20 seconds between server errors (for |
+// server reasons), we have a 30s +- 10s (33%) jitter initial backoff. |
// TODO(zea): consider sharing/synchronizing the scheduling of backoff retries |
// themselves. |
const net::BackoffEntry::Policy kDefaultBackoffPolicy = { |
@@ -37,17 +39,17 @@ const net::BackoffEntry::Policy kDefaultBackoffPolicy = { |
0, |
// Initial delay for exponential back-off in ms. |
- 15000, // 15 seconds. |
+ 30 * 1000, // 30 seconds. |
// Factor by which the waiting time will be multiplied. |
2, |
// Fuzzing percentage. ex: 10% will spread requests randomly |
// between 90%-100% of the calculated time. |
- 0.5, // 50%. |
+ 0.33, // 33%. |
// Maximum amount of time we are willing to delay our request in ms. |
- 1000 * 60 * 5, // 5 minutes. |
+ 10 * 60 * 1000, // 10 minutes. |
// Time to keep an entry from being discarded even when it |
// has no significant state, -1 to never discard. |