diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-11-12 19:19:02 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-11-12 19:19:02 +0100 |
commit | f493a533befb3f76a03992c1e76c3016da72f135 (patch) | |
tree | a21befc5b3f5031c3e1bd017c17a8f7bf24637d2 | |
parent | fbf94e47dbdc1cb3303b51f32f77481eb68fae3d (diff) | |
download | sink-f493a533befb3f76a03992c1e76c3016da72f135.tar.gz sink-f493a533befb3f76a03992c1e76c3016da72f135.zip |
Remove complete commands from the completeCommands hash again
-rw-r--r-- | common/resourceaccess.cpp | 5 |
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 | ||
126 | void ResourceAccess::Private::callCallbacks() | 126 | void 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); |