fixed YACReader<->YACReaderLibrary communication

This commit is contained in:
Luis Ángel San Martín
2014-03-26 15:09:27 +01:00
parent 2ff1a49215
commit e6d7a47575
2 changed files with 18 additions and 8 deletions

View File

@ -114,12 +114,15 @@ void YACReaderClientConnectionWorker::run()
tries = 0;
QByteArray data;
int dataRead = 0;
while(data.size() < totalSize && tries < 200)
{
data.append(clientConnection->readAll());
if(data.length() < totalSize)
clientConnection->waitForReadyRead(100);
tries++;
if(dataRead == data.length()) //no bytes were read
tries++;
dataRead = data.length();
}
if(tries == 200)
{