summaryrefslogtreecommitdiffstats
path: root/common/queryrunner.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-02-14 00:06:05 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-02-14 00:06:05 +0100
commit66199a99dca9a1be6fcd522613c8a4175951f11d (patch)
tree861572d7d1a6ffdb100a02abdceb120f20eb48e6 /common/queryrunner.cpp
parent043353652fea1c55fa412a76c94bd265cee05b1f (diff)
downloadsink-66199a99dca9a1be6fcd522613c8a4175951f11d.tar.gz
sink-66199a99dca9a1be6fcd522613c8a4175951f11d.zip
Avoid crashing if we get too many notifications.
If notifications come in faster than we can process them we'd run into the assert.
Diffstat (limited to 'common/queryrunner.cpp')
-rw-r--r--common/queryrunner.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/queryrunner.cpp b/common/queryrunner.cpp
index 40880eb..1b142c8 100644
--- a/common/queryrunner.cpp
+++ b/common/queryrunner.cpp
@@ -120,6 +120,10 @@ QueryRunner<DomainType>::QueryRunner(const Sink::Query &query, const Sink::Resou
120 fetcher({}); 120 fetcher({});
121 return KAsync::null(); 121 return KAsync::null();
122 } 122 }
123 if (mQueryInProgress) {
124 //Can happen if the revision come in quicker than we process them.
125 return KAsync::null();
126 }
123 Q_ASSERT(!mQueryInProgress); 127 Q_ASSERT(!mQueryInProgress);
124 return KAsync::syncStart<void>([&] { 128 return KAsync::syncStart<void>([&] {
125 mQueryInProgress = true; 129 mQueryInProgress = true;