mirror of
https://github.com/YACReader/yacreader
synced 2025-07-23 15:35:03 -04:00
fixed YACReader<->YACReaderLibrary communication
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user