diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2015-10-15 15:10:41 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2015-10-26 15:54:27 +0100 |
commit | 94a5ac857f7cfc0a8e20035fabc39841fe17249c (patch) | |
tree | b1da6162b017a4263d1ecaf584d49e141dcb5e15 /platform/node | |
parent | 5406048a57f48162774bd60fd645efb2f2d07362 (diff) | |
download | qtlocation-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.cpp | 1 |
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); } } |