[SOLVED] QLocalSocket::flush returns false, but sends data
-
Greetings,
In our project we're using server and socket for interprocess communication. But there's a strange thing occurs - sometimes QLocalSocket::flush() returns false. But data succesfully outgoes (I receive that data on client). Socket's errorString method returns "Unknown error". What can it be?
-
"bool QLocalSocket::flush()":http://doc.qt.io/qt-5/qlocalsocket.html#flush returns true If any data was written; otherwise false is returned.
So, in your case it means that flush did not send any data to a socket.
Why? Because all data already been sent by OS.[EDIT]: "Unknow socket error" is a default value for socketError
-
Got this. Thank you.