summaryrefslogtreecommitdiffstats
path: root/src/network/kernel/qhostinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/kernel/qhostinfo.cpp')
-rw-r--r--src/network/kernel/qhostinfo.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp
index 6894978..2dd6485 100644
--- a/src/network/kernel/qhostinfo.cpp
+++ b/src/network/kernel/qhostinfo.cpp
@@ -551,13 +551,11 @@ void QHostInfoLookupManager::work()
}
}
- if (scheduled && threadPool.tryStart(scheduled)) {
+ if (scheduled && currentLookups.size() < threadPool.maxThreadCount()) {
// runnable now running in new thread, track this in currentLookups
+ threadPool.start(scheduled);
iterator.remove();
currentLookups.append(scheduled);
- } else if (scheduled) {
- // wanted to start, but could not because thread pool is busy
- break;
} else {
// was postponed, continue iterating
continue;