summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-11-12 19:19:02 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-11-12 19:19:02 +0100
commitf493a533befb3f76a03992c1e76c3016da72f135 (patch)
treea21befc5b3f5031c3e1bd017c17a8f7bf24637d2 /common
parentfbf94e47dbdc1cb3303b51f32f77481eb68fae3d (diff)
downloadsink-f493a533befb3f76a03992c1e76c3016da72f135.tar.gz
sink-f493a533befb3f76a03992c1e76c3016da72f135.zip
Remove complete commands from the completeCommands hash again
Diffstat (limited to 'common')
-rw-r--r--common/resourceaccess.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/resourceaccess.cpp b/common/resourceaccess.cpp
index fdef6f2..dab6335 100644
--- a/common/resourceaccess.cpp
+++ b/common/resourceaccess.cpp
@@ -125,8 +125,9 @@ void ResourceAccess::Private::abortPendingOperations()
125 125
126void ResourceAccess::Private::callCallbacks() 126void ResourceAccess::Private::callCallbacks()
127{ 127{
128 for (auto id : completeCommands.keys()) { 128 const auto commandIds = completeCommands.keys();
129 const bool success = completeCommands.value(id); 129 for (auto id : commandIds) {
130 const bool success = completeCommands.take(id);
130 // We remove the callbacks first because the handler can kill resourceaccess directly 131 // We remove the callbacks first because the handler can kill resourceaccess directly
131 const auto callbacks = resultHandler.values(id); 132 const auto callbacks = resultHandler.values(id);
132 resultHandler.remove(id); 133 resultHandler.remove(id);