.cosmetics

git-svn-id: svn://ultimatepp.org/upp/trunk@7133 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2014-04-02 08:51:55 +00:00
parent af71930d67
commit fe4756e9aa
2 changed files with 4 additions and 2 deletions

View file

@ -370,7 +370,7 @@ bool HttpRequest::Do()
NEVER();
}
if(phase != FAILED)
if(phase != FAILED) {
if(IsSocketError() || IsError())
phase = FAILED;
else
@ -383,6 +383,7 @@ bool HttpRequest::Do()
HttpError("connection was aborted");
phase = FAILED;
}
}
if(phase == FAILED) {
if(retry_count++ < max_retries) {

View file

@ -601,7 +601,7 @@ bool TcpSocket::IsGlobalTimeout()
bool TcpSocket::RawWait(dword flags, int end_time)
{ // wait till end_time
LLOG("RawWait end_time: " << end_time << ", current time " << msecs());
LLOG("RawWait end_time: " << end_time << ", current time " << msecs() << ", to wait: " << end_time - msecs());
is_timeout = false;
if((flags & WAIT_READ) && ptr != end)
return true;
@ -620,6 +620,7 @@ bool TcpSocket::RawWait(dword flags, int end_time)
tval.tv_sec = to / 1000;
tval.tv_usec = 1000 * (to % 1000);
tvalp = &tval;
LLOG("RawWait timeout: " << to);
}
fd_set fdsetr[1], fdsetw[1], fdsetx[1];;
FD_ZERO(fdsetr);