summaryrefslogtreecommitdiff
path: root/platform/node
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-10-15 15:10:41 +0200
committerKonstantin Käfer <mail@kkaefer.com>2015-10-26 15:54:27 +0100
commit94a5ac857f7cfc0a8e20035fabc39841fe17249c (patch)
treeb1da6162b017a4263d1ecaf584d49e141dcb5e15 /platform/node
parent5406048a57f48162774bd60fd645efb2f2d07362 (diff)
downloadqtlocation-mapboxgl-94a5ac857f7cfc0a8e20035fabc39841fe17249c.tar.gz
[core] all requests have to be canceled explicitly now
By not automatically destroying Request objects after the result has been delivered, we are making sure that we can potentially fire the callback multiple times without adverse effects. This means that you have to hold on to the result of fs->request(), can explicitly cancel it if you don't want to be notified of data changes anymore. Not doing so will monitor the request indefinitely and will prevent the app from exiting.
Diffstat (limited to 'platform/node')
-rw-r--r--platform/node/src/node_file_source.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/platform/node/src/node_file_source.cpp b/platform/node/src/node_file_source.cpp
index b4828e7687..5a5a34f0ce 100644
--- a/platform/node/src/node_file_source.cpp
+++ b/platform/node/src/node_file_source.cpp
@@ -133,7 +133,6 @@ void NodeFileSource::notify(const mbgl::Resource& resource, const std::shared_pt
}
observersIt->second->notify(response);
- observers.erase(observersIt);
}
}