.Web: sproc.cpp time interval fix

git-svn-id: svn://ultimatepp.org/upp/trunk@2990 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2011-01-11 16:59:11 +00:00
parent 30ce9c6f0d
commit a4cf982262

View file

@ -571,8 +571,9 @@ void RemoteSlaveProcess::Recv(int part, int timeout)
return;
}
// LOG("RemoteSlaveProcess::Recv(" << part << ")");
unsigned end = (IsNull(timeout) ? (unsigned)-1 : GetTickCount() + timeout);
while(GetTickCount() <= (int)end && (socket.Peek() || current_part <= part))
int starttick = GetTickCount();
while( (IsNull(timeout) || int(GetTickCount())-starttick <= timeout) && (socket.Peek() || current_part <= part))
{
String data = socket.Read(0);
SVRLOG("-> [" << current_part << "] = " << data.GetLength() << " bytes: <" << data << ">");