diff options
author | Peter Hartmann <peter.hartmann@nokia.com> | 2009-11-04 10:44:23 (GMT) |
---|---|---|
committer | Peter Hartmann <peter.hartmann@nokia.com> | 2009-11-04 12:04:10 (GMT) |
commit | 135710b1fa38f72a934c542d196af9eff066d908 (patch) | |
tree | a269c3ba9e761e7b386b361ed912aeaf635a60f9 /src/network/kernel | |
parent | b22f7a8af0a781885a64d0cd1001192c99872aef (diff) | |
download | Qt-135710b1fa38f72a934c542d196af9eff066d908.zip Qt-135710b1fa38f72a934c542d196af9eff066d908.tar.gz Qt-135710b1fa38f72a934c542d196af9eff066d908.tar.bz2 |
QHostInfo: do not wait forever on cleanup
patch by Warwick Allison. On cleanup in QHostInfoAgent, we were waiting
forever for the thread to terminate, which did not always succeed due to
a Linux kernel bug. Now, we just wait for some time and then return
anyway.
Reviewed-by: Marius Storm-Olsen
Task-number: QTBUG-5296
Diffstat (limited to 'src/network/kernel')
-rw-r--r-- | src/network/kernel/qhostinfo_p.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/network/kernel/qhostinfo_p.h b/src/network/kernel/qhostinfo_p.h index 64c5152..afd3570 100644 --- a/src/network/kernel/qhostinfo_p.h +++ b/src/network/kernel/qhostinfo_p.h @@ -161,9 +161,11 @@ public Q_SLOTS: cond.wakeOne(); } #ifndef QT_NO_THREAD - if (!wait(QHOSTINFO_THREAD_WAIT)) + if (!wait(QHOSTINFO_THREAD_WAIT)) { terminate(); - wait(); + // Don't wait forever; see QTBUG-5296. + wait(QHOSTINFO_THREAD_WAIT); + } #endif } |