Reconnected immediately to the XMPP whenever it closes the connection

This commit is contained in:
Florent Le Coz
2014-03-24 20:31:02 +01:00
parent e196d2f1f4
commit ffc820e234
6 changed files with 46 additions and 0 deletions
+3
View File
@@ -222,6 +222,9 @@ void SocketHandler::close()
{
this->connected = false;
this->connecting = false;
this->in_buf.clear();
this->out_buf.clear();
this->port.clear();
this->poller->remove_socket_handler(this->get_socket());
::close(this->socket);
// recreate the socket for a potential future usage