fixed bug #1713560 - NSISdl 100% CPU usage during DNS resolution

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5146 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2007-05-05 20:20:58 +00:00
parent 65949a95a1
commit a236239cff

View file

@ -399,12 +399,16 @@ __declspec(dllexport) void download (HWND parent,
// progressFunc ("Connecting ...", 0);
if (last_recv_time+timeout_ms < GetTickCount())
error = "Timed out on connecting.";
else
Sleep(10); // don't busy-loop while connecting
} else if (get->get_status () == 1) {
progress_callback("Reading headers", 0);
if (last_recv_time+timeout_ms < GetTickCount())
error = "Timed out on getting headers.";
else
Sleep(10); // don't busy-loop while reading headers
} else if (get->get_status () == 2) {