Hi all,
I'm trying to use QTcpSocket to connect to a server, with the code below I noticed an increase in the number of handles allocated everytime I perform connectToHost not realesed with disconnect ot close.
Am I doing something wrong?
Basically I need to create a new connection every time I need to contact the server, so I need to connect several times during the life of my software.

Qt Code:
  1. bool ret;
  2. QTcpSocket m_Socket;
  3. m_Socket.connectToHost("127.0.0.1", 740);
  4. ret=m_Socket.waitForConnected();
  5. m_Socket.disconnectFromHost();
  6. ret=m_Socket.waitForDisconnected();
  7. QAbstractSocket::SocketError se;
  8. se=m_Socket.error();
  9.  
  10. m_Socket.abort();
  11. m_Socket.close();
To copy to clipboard, switch view to plain text mode 


Any help is appreciated.
Thanks in advance