PDA

View Full Version : QTcpSocket connectionClosed not working correctly



Denarius
18th March 2009, 14:36
hello
I've got a problem

I created a TcpServer and a TcpClient with QTcpServer/Socket.

When the server disconnects himself from the client with disconnectFromHost(), the client gets a connectionClosed signal .

But when the client disconnects himself from the server, the server isn't getting the connectionClosed signal.
I also see that the client tries to disconnect several times from the host, but after 6-7 tries it closes the connection with an abort().
What's going on?

the server and client are closing the connection in the exact same manner.
With disconnectFromHost();

The host is only sending data and not reading anything
The client is only sending data and not sending anything

wysota
19th March 2009, 13:40
Could you prepare a compilable example reproducing the problem?