Core: Fixed timeouts of DNS resolving phase

git-svn-id: svn://ultimatepp.org/upp/trunk@8508 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2015-06-04 13:56:31 +00:00
parent f744b03a8a
commit 91f1375876

View file

@ -445,7 +445,7 @@ void HttpRequest::Start()
LLOG("Using " << (use_proxy ? "proxy " : "") << h << ":" << p);
StartPhase(DNS);
if(IsNull(GetTimeout())) {
if(IsNull(GetTimeout()) && timeout == INT_MAX) {
if(WhenWait) {
addrinfo.Start(h, p);
while(addrinfo.InProgress()) {
@ -471,6 +471,8 @@ void HttpRequest::Dns()
return;
}
Sleep(1);
if(msecs(start_time) >= timeout)
break;
}
}