-
Bug
-
Resolution: Done
-
P0: Blocker
-
4.6.0
-
None
-
135710b1fa38f72a934c542d196af9eff066d908
Qt hangs forever if host lookup is pending when application quits.
Tested on Linux.
#include <QApplication> #include <QHostInfo> int main(int argc, char ** argv) { QApplication app(argc,argv); QHostInfo::lookupHost("qt.nokia.com",0,0); usleep(10000); }
The usleep needs to be long enough for QHostInfoAgent::fromName to have started, but not returned. Too small, and it doesn't start, too long and it returns. Values from 500 to 500000 work for me though, so it's not very sensitive (will depend on DNS of course).