Details
-
Bug
-
Resolution: Incomplete
-
P2: Important
-
None
-
4.6.2
-
None
-
Windows XP, Vista, 7. Regular Sleep mode with network setup to sleep.
Description
QHostInfoLookupManager::work
Noticed that after prolonged sleep the host lookup would not work.
I created a program that accesses a website every 60 seconds. If the computer goes to sleep with network set to sleep as well, the host lookup would not work.
I debugged the problem and found out that inside QHostInfoLookupManager::work there were over 100 postponed lookups. Because the toBeLookedUp was the same for all request, then it will not schedule a new lookup. Thus never creating the thread to do the actual lookup and never returning the ip address to do finish the QNetworkAccessManager get function.
qhostinfo.cpp:line505
for (int i = 0; i < currentLookups.size(); i++) { if (currentLookups.at(i)->toBeLookedUp == scheduled->toBeLookedUp) { iterator.remove(); postponedLookups.append(scheduled); scheduled = 0; break; } }
I am not sure what makes the first request not come back. But I did notice that the requests start going into the postponedLookups.