Stop reconnectTimer when no url is availablle
This commit is contained in:
parent
47bc0f5ac5
commit
4e25fa4e8e
1 changed files with 2 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue