diff --git a/threaddata.cpp b/threaddata.cpp index a21cdca..5ce5c82 100644 --- a/threaddata.cpp +++ b/threaddata.cpp @@ -682,7 +682,12 @@ void ThreadData::removeExpiredRetainedMessages() if (!done) { auto f = std::bind(&ThreadData::removeExpiredRetainedMessages, this); + +#ifdef TESTING + addImmediateTask(f); +#else addDelayedTask(f, 100); +#endif } }