kio: process events instead of terminating the host information thread

nss resolver really does not like it when its thread is terminated/canceled
and randomly causes exception to be raised or segmentation fault

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-05-20 20:34:23 +03:00
parent c42a8327a2
commit 6e9cca36ab

View file

@ -586,7 +586,7 @@ QHostInfo KUriFilterPlugin::resolveName(const QString &hostname, unsigned long t
khostinfothread.start();
while (!khostinfothread.isFinished()) {
if (hostinfotimer.elapsed() >= timeout) {
khostinfothread.terminate();
khostinfothread.quit();
return QHostInfo();
}
QCoreApplication::processEvents();