Stop reconnectTimer when no url is availablle

This commit is contained in:
Jan Kaluza 2016-02-20 17:54:36 +01:00
parent 47bc0f5ac5
commit 4e25fa4e8e

View file

@ -84,7 +84,9 @@ void WebSocketClient::connectServer(const std::string &url) {
void WebSocketClient::disconnectServer() {
if (m_conn) {
m_reconnectTimer->stop();
m_conn->onDataRead.disconnect(boost::bind(&WebSocketClient::handleDataRead, this, _1));
m_conn->onDisconnected.connect(boost::bind(&WebSocketClient::handleDisconnected, this, _1));
m_conn->disconnect();
}
}