diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-01-08 16:41:47 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-01-08 16:41:47 +0100 |
commit | 5df2b7c593594e61e403273c44ceae29207448c4 (patch) | |
tree | 41fa8ab1b01274134fdf4e81847dab3abe7e71cb /common/queryrunner.cpp | |
parent | fb09018d49e182012422d721fb0fbf95130b82c5 (diff) | |
download | sink-5df2b7c593594e61e403273c44ceae29207448c4.tar.gz sink-5df2b7c593594e61e403273c44ceae29207448c4.zip |
The local variable might be gone already when the thread starts.
Diffstat (limited to 'common/queryrunner.cpp')
-rw-r--r-- | common/queryrunner.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/queryrunner.cpp b/common/queryrunner.cpp index 288ce27..928e1e0 100644 --- a/common/queryrunner.cpp +++ b/common/queryrunner.cpp | |||
@@ -113,6 +113,7 @@ QueryRunner<DomainType>::QueryRunner(const Sink::Query &query, const Sink::Resou | |||
113 | auto resourceContext = mResourceContext; | 113 | auto resourceContext = mResourceContext; |
114 | auto logCtx = mLogCtx; | 114 | auto logCtx = mLogCtx; |
115 | auto state = mQueryState; | 115 | auto state = mQueryState; |
116 | auto resultTransformation = mResultTransformation; | ||
116 | if (!mInitialQueryComplete) { | 117 | if (!mInitialQueryComplete) { |
117 | SinkWarningCtx(mLogCtx) << "Can't start the incremental query before the initial query is complete"; | 118 | SinkWarningCtx(mLogCtx) << "Can't start the incremental query before the initial query is complete"; |
118 | fetcher(); | 119 | fetcher(); |
@@ -127,7 +128,7 @@ QueryRunner<DomainType>::QueryRunner(const Sink::Query &query, const Sink::Resou | |||
127 | mQueryInProgress = true; | 128 | mQueryInProgress = true; |
128 | }) | 129 | }) |
129 | .then(async::run<ReplayResult>([=]() { | 130 | .then(async::run<ReplayResult>([=]() { |
130 | QueryWorker<DomainType> worker(query, resourceContext, bufferType, mResultTransformation, logCtx); | 131 | QueryWorker<DomainType> worker(query, resourceContext, bufferType, resultTransformation, logCtx); |
131 | return worker.executeIncrementalQuery(query, *resultProvider, state); | 132 | return worker.executeIncrementalQuery(query, *resultProvider, state); |
132 | })) | 133 | })) |
133 | .then([query, this, resultProvider, guardPtr](const ReplayResult &newRevisionAndReplayedEntities) { | 134 | .then([query, this, resultProvider, guardPtr](const ReplayResult &newRevisionAndReplayedEntities) { |