diff options
author | Thiago Marcos P. Santos <thiago@mapbox.com> | 2017-02-06 16:04:04 +0100 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2017-02-07 12:17:40 +0100 |
commit | e6659242bc4b2b19f74cfa44d16e1da0e9127d66 (patch) | |
tree | 5084339869b76e0df8c932824e5dffd7373ff7ed /include | |
parent | 2c7350c09375ad363e3a42f24956806a1385a7bc (diff) | |
download | qtlocation-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')
-rw-r--r-- | include/mbgl/storage/response.hpp | 2 |
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; } }; |