Changeset - e2d8481aaa6f
[Not reviewed]
0 1 0
Jan Kaluza - 14 years ago 2011-07-25 17:18:21
hanzz.k@gmail.com
Fixed crash when user was associated with backend which was going to die
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/networkpluginserver.cpp
Show inline comments
 
@@ -909,13 +909,13 @@ void NetworkPluginServer::sendPing(Backend *c) {
 

	
 
NetworkPluginServer::Backend *NetworkPluginServer::getFreeClient() {
 
	NetworkPluginServer::Backend *c = NULL;
 
	bool spawnNew = false;
 
	for (std::list<Backend *>::const_iterator it = m_clients.begin(); it != m_clients.end(); it++) {
 
		// This backend is free.
 
		if ((*it)->users.size() < CONFIG_INT(m_config, "service.users_per_backend") && c->connection) {
 
		if ((*it)->users.size() < CONFIG_INT(m_config, "service.users_per_backend") && (*it)->connection) {
 
			c = *it;
 
			break;
 
		}
 
	}
 

	
 
	if (c == NULL) {
0 comments (0 inline, 0 general)