Changeset - 9fdc06d7931d
[Not reviewed]
0 1 0
Jan Kaluza - 14 years ago 2011-08-17 13:04:52
hanzz.k@gmail.com
Fixed rare crash in pingTimeout when backend was disconnect
1 file changed with 8 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/networkpluginserver.cpp
Show inline comments
 
@@ -664,15 +664,19 @@ void NetworkPluginServer::pingTimeout() {
 
		}
 
		else {
 
			LOG4CXX_INFO(logger, "Disconnecting backend " << (*it) << ". PING response not received.");
 
			(*it)->connection->disconnect();
 
			(*it)->connection.reset();
 
			if ((*it)->connection) {
 
				(*it)->connection->disconnect();
 
				(*it)->connection.reset();
 
			}
 
// 			handleSessionFinished((*it));
 
		}
 

	
 
		if ((*it)->users.size() == 0) {
 
			LOG4CXX_INFO(logger, "Disconnecting backend " << (*it) << ". There are no users.");
 
// 			(*it)->connection->disconnect();
 
			(*it)->connection.reset();
 
			if ((*it)->connection) {
 
				(*it)->connection->disconnect();
 
				(*it)->connection.reset();
 
			}
 
		}
 
	}
 
	m_pingTimer->start();
0 comments (0 inline, 0 general)