aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-12-23 21:49:48 +0300
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-12-23 21:49:48 +0300
commit79b9f6d928cbd516a610d845891f4054df05e0c4 (patch)
tree31c30202acc582664bc23bc95901127e8c0a3804 /lib
parent92264831077874511341b2dabae255649f741f54 (diff)
downloadlibquotient-79b9f6d928cbd516a610d845891f4054df05e0c4.tar.gz
libquotient-79b9f6d928cbd516a610d845891f4054df05e0c4.zip
ConnectionData::submit: when not queuing, still submit asynchronously
Otherwise BaseJob::messageSent has every chance to be overlooked by clients who subscribe to it after calling callApi().
Diffstat (limited to 'lib')
-rw-r--r--lib/connectiondata.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/connectiondata.cpp b/lib/connectiondata.cpp
index 753fa3ad..e806f952 100644
--- a/lib/connectiondata.cpp
+++ b/lib/connectiondata.cpp
@@ -96,7 +96,7 @@ void ConnectionData::submit(BaseJob* job)
{
job->setStatus(BaseJob::Pending);
if (!d->rateLimiter.isActive()) {
- job->sendRequest();
+ QTimer::singleShot(0, job, &BaseJob::sendRequest);
return;
}
d->jobs[size_t(job->isBackground())].emplace(job);