[Interest] QLocalSocket bug?

Etienne Sandré-Chardonnal etienne.sandre at m4x.org
Tue Jan 5 18:44:13 CET 2016


I am under windows (mingw)



> He asked why canReadLine() always returns true when readLine() invokes in
> the loop, so the loop is infinite... Execution order doesn't explain it.
>
>
Yes, exactly. When the socket is closed, a canReadLine() or
bytesAvailable() reading loop while run indefinitely.

Also, I have found another problem, when the socket is closed from the
server side (eg if you disconnect the socket returned by
nextPendingConnection() later), it actually closes the QIODevice but the
client does not disconnect (it does not receive any disconnect signal)

It seems that win32 implementation of QLocalSocket is not so good, there
are many issues which prevent plain replacement of QTcpServer/Socket by
QLocalServer/Socket
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160105/2ca73579/attachment.html>


More information about the Interest mailing list