summaryrefslogtreecommitdiff
path: root/include/mbgl/storage
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2017-02-06 16:04:04 +0100
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2017-02-07 12:17:40 +0100
commite6659242bc4b2b19f74cfa44d16e1da0e9127d66 (patch)
tree5084339869b76e0df8c932824e5dffd7373ff7ed /include/mbgl/storage
parent2c7350c09375ad363e3a42f24956806a1385a7bc (diff)
downloadqtlocation-mapboxgl-e6659242bc4b2b19f74cfa44d16e1da0e9127d66.tar.gz
[core] Do not consider error'ed responses fresh
It has the unwanted side effect of not retrying anymore in case of error.
Diffstat (limited to 'include/mbgl/storage')
-rw-r--r--include/mbgl/storage/response.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/mbgl/storage/response.hpp b/include/mbgl/storage/response.hpp
index 2460f4340d..32fe4e0c8a 100644
--- a/include/mbgl/storage/response.hpp
+++ b/include/mbgl/storage/response.hpp
@@ -35,7 +35,7 @@ public:
optional<std::string> etag;
bool isFresh() const {
- return !expires || *expires > util::now();
+ return expires ? *expires > util::now() : !error;
}
};