summaryrefslogtreecommitdiff
path: root/src/mbgl/style/sources/image_source.cpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-10-09 12:59:27 +0200
committerKonstantin Käfer <mail@kkaefer.com>2017-10-11 11:15:06 +0200
commit4fe39ef8c123391ca89f36290fc6bf2dc7cdd98a (patch)
treee41558bee74394c181664cf6047abad8a8cb7a2d /src/mbgl/style/sources/image_source.cpp
parent98a47884f06a8f165a2c15a54f82b356c8ef23d8 (diff)
downloadqtlocation-mapboxgl-4fe39ef8c123391ca89f36290fc6bf2dc7cdd98a.tar.gz
[core] make forcing cache/network only more explicitupstream/stuck-tiles
Previously, we used the existence of a `prior*` field in the Resource object as an indication for whether we should consult the cache or not. However, this is prone to error, since a failed cache lookup won't set any prior fields. Therefore, we manually set `priorExpires` to 0. This in turn triggered another bug where generated wrong expiration timestamps when the server response we got was expired (or expired between sending and receiving). This commit changes the flags so that we can now explicitly request CacheOnly/NetworkOnly (or All) loading methods, rather than the implicit Optional/Required naming scheme.
Diffstat (limited to 'src/mbgl/style/sources/image_source.cpp')
-rw-r--r--src/mbgl/style/sources/image_source.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mbgl/style/sources/image_source.cpp b/src/mbgl/style/sources/image_source.cpp
index 9b60ba1a48..fa268da0ef 100644
--- a/src/mbgl/style/sources/image_source.cpp
+++ b/src/mbgl/style/sources/image_source.cpp
@@ -59,7 +59,7 @@ void ImageSource::loadDescription(FileSource& fileSource) {
if (req || loaded) {
return;
}
- const Resource imageResource { Resource::Image, *url, {}, Resource::Necessity::Required };
+ const Resource imageResource { Resource::Image, *url, {} };
req = fileSource.request(imageResource, [this](Response res) {
if (res.error) {