mirror of
https://github.com/YACReader/yacreader
synced 2025-07-26 17:04:45 -04:00
avoid closing local sockets before writing is finished
This commit is contained in:
@ -110,7 +110,7 @@ void YACReaderClientConnectionWorker::run()
|
||||
}
|
||||
if(tries == 20)
|
||||
{
|
||||
QLOG_ERROR() << "Local connection: unable to read the message size";
|
||||
QLOG_ERROR() << "Local connection: unable to read the message size" << clientConnection->errorString();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -163,6 +163,7 @@ void YACReaderClientConnectionWorker::run()
|
||||
while(written != block.size() && tries < 200)
|
||||
{
|
||||
int ret = clientConnection->write(block);
|
||||
clientConnection->waitForBytesWritten(10);
|
||||
if(ret != -1)
|
||||
{
|
||||
written += ret;
|
||||
|
Reference in New Issue
Block a user