diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2015-10-27 12:11:16 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2015-10-27 12:11:16 +0100 |
commit | 32c0fb468f21a4ee9fc606d4536c3687c3412b7d (patch) | |
tree | 661c94cc41d51f918e035a2cc86a598c179d6419 /platform/darwin | |
parent | f3ffb45cf6adbdca375217c645eb455ff47991ec (diff) | |
download | qtlocation-mapboxgl-32c0fb468f21a4ee9fc606d4536c3687c3412b7d.tar.gz |
[http] don't retry when there's already a request in progress
Diffstat (limited to 'platform/darwin')
-rw-r--r-- | platform/darwin/http_request_nsurl.mm | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/platform/darwin/http_request_nsurl.mm b/platform/darwin/http_request_nsurl.mm index 59f3c6b71a..10f1d0450e 100644 --- a/platform/darwin/http_request_nsurl.mm +++ b/platform/darwin/http_request_nsurl.mm @@ -125,7 +125,6 @@ void HTTPNSURLRequest::start() { attempts++; @autoreleasepool { - NSURL *url = [NSURL URLWithString:@(resource.url.c_str())]; if (context->accountType == 0 && ([url.host isEqualToString:@"mapbox.com"] || [url.host hasSuffix:@".mapbox.com"])) { @@ -317,7 +316,7 @@ void HTTPNSURLRequest::retry(uint64_t timeout) { void HTTPNSURLRequest::retry() { // All batons get notified when the network status changed, but some of them // might not actually wait for the network to become available again. - if (strategy == PreemptImmediately) { + if (strategy == PreemptImmediately && !task) { // Triggers the timer upon the next event loop iteration. timer.stop(); timer.start(0, 0, [this] { start(); }); |