summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2016-02-23 18:37:45 +0200
committerThiago Marcos P. Santos <thiago@mapbox.com>2016-02-26 03:52:02 +0200
commit59a45b8400c1c07b3163c2274b0b59115cc23351 (patch)
tree1f5e8bd9e4aeb54e92a9a6f169f8787f2cb70ce6 /src
parentc20b99f9a40b8b8632c34d67a1da104799506fe8 (diff)
downloadqtlocation-mapboxgl-59a45b8400c1c07b3163c2274b0b59115cc23351.tar.gz
[core] Add timeout for clock skew
If the server keeps sending replies considered from the client in the past (there is no way to tell if the server or client clock is wrong), the client will try to interpolate a valid expiration time based on the delta of the expiration intervals sent by the server. If the intervals are always the same, exponential backoff kicks in until we get a different expiration time from what we already have.
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/util/constants.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mbgl/util/constants.cpp b/src/mbgl/util/constants.cpp
index 90a4d28c2f..9b3c110836 100644
--- a/src/mbgl/util/constants.cpp
+++ b/src/mbgl/util/constants.cpp
@@ -31,6 +31,8 @@ const double MAX_ZOOM = 25.5;
const uint64_t DEFAULT_MAX_CACHE_SIZE = 50 * 1024 * 1024;
+const Duration CLOCK_SKEW_RETRY_TIMEOUT = Seconds(30);
+
} // namespace util
namespace debug {