From ffc820e234ebba39a0f04607f9a0fb044fe31b73 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Mon, 24 Mar 2014 20:31:02 +0100 Subject: Reconnected immediately to the XMPP whenever it closes the connection --- src/network/socket_handler.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/network') diff --git a/src/network/socket_handler.cpp b/src/network/socket_handler.cpp index f344786..6f91e74 100644 --- a/src/network/socket_handler.cpp +++ b/src/network/socket_handler.cpp @@ -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 -- cgit v1.2.3