diff --git a/src/cpp/ripple/JobQueue.cpp b/src/cpp/ripple/JobQueue.cpp index d169a9ddad..ccd992da2c 100644 --- a/src/cpp/ripple/JobQueue.cpp +++ b/src/cpp/ripple/JobQueue.cpp @@ -291,12 +291,19 @@ void JobQueue::threadEntry() while (1) { NameThread("waiting"); + bool didIO = false; while (mJobSet.empty() && !mShuttingDown) { - if ((mIOThreadCount < mMaxIOThreadCount) && !theApp->isShutdown()) + if ((mIOThreadCount < mMaxIOThreadCount) && !didIO && !theApp->isShutdown()) + { IOThread(sl); + didIO = true; + } else + { mJobCond.wait(sl); + didIO = false; + } } if (mShuttingDown)