summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-10-27 12:11:16 +0100
committerKonstantin Käfer <mail@kkaefer.com>2015-10-27 12:11:16 +0100
commit32c0fb468f21a4ee9fc606d4536c3687c3412b7d (patch)
tree661c94cc41d51f918e035a2cc86a598c179d6419 /platform
parentf3ffb45cf6adbdca375217c645eb455ff47991ec (diff)
downloadqtlocation-mapboxgl-32c0fb468f21a4ee9fc606d4536c3687c3412b7d.tar.gz
[http] don't retry when there's already a request in progress
Diffstat (limited to 'platform')
-rw-r--r--platform/darwin/http_request_nsurl.mm3
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(); });