void XMPPFrontend::handleConnectionError(const ComponentError &error) { std::string str = "Unknown error"; switch (error.getType()) { case ComponentError::UnknownError: str = "Unknown error"; break; case ComponentError::ConnectionError: str = "Connection error"; break; case ComponentError::ConnectionReadError: str = "Connection read error"; break; case ComponentError::ConnectionWriteError: str = "Connection write error"; break; case ComponentError::XMLError: str = "XML Error"; break; case ComponentError::AuthenticationFailedError: str = "Authentication failed error"; break; case ComponentError::UnexpectedElementError: str = "Unexpected element error"; break; } m_transport->handleConnectionError(str); }
void Component::handleConnectionError(const ComponentError &error) { onConnectionError(error); // if (m_reconnectCount == 2) // Component::instance()->userManager()->removeAllUsers(); std::string str = "Unknown error"; switch (error.getType()) { case ComponentError::UnknownError: str = "Unknown error"; break; case ComponentError::ConnectionError: str = "Connection error"; break; case ComponentError::ConnectionReadError: str = "Connection read error"; break; case ComponentError::ConnectionWriteError: str = "Connection write error"; break; case ComponentError::XMLError: str = "XML Error"; break; case ComponentError::AuthenticationFailedError: str = "Authentication failed error"; break; case ComponentError::UnexpectedElementError: str = "Unexpected element error"; break; } LOG4CXX_INFO(logger, "Disconnected from XMPP server. Error: " << str); m_reconnectTimer->start(); }