Changeset - 4e25fa4e8ecb
[Not reviewed]
0 1 0
Jan Kaluza - 10 years ago 2016-02-20 17:54:36
jkaluza@redhat.com
Stop reconnectTimer when no url is availablle
1 file changed with 2 insertions and 0 deletions:
0 comments (0 inline, 0 general)
libtransport/WebSocketClient.cpp
Show inline comments
 
@@ -81,13 +81,15 @@ void WebSocketClient::connectServer(const std::string &url) {
 
	m_path = u.substr(u.find("/"));
 
	connectServer();
 
}
 

	
 
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();
 
	}
 
}
 

	
 
void WebSocketClient::write(const std::string &data) {
 
	if (!m_conn) {
0 comments (0 inline, 0 general)