diff --git a/src/networkpluginserver.cpp b/src/networkpluginserver.cpp index 64dc9f54e0f5098cce7f22aac2d48631438fc5d8..feade943e1dcb2210642a6e173090c12ac4e154f 100644 --- a/src/networkpluginserver.cpp +++ b/src/networkpluginserver.cpp @@ -288,6 +288,7 @@ void NetworkPluginServer::handleNewClientConnection(boost::shared_ptrres = 0; client->init_res = 0; client->shared = 0; + client->willDie = 0; // Backend does not accept new clients automatically if it's long-running client->acceptUsers = !m_isNextLongRun; client->longRun = m_isNextLongRun; @@ -336,6 +337,9 @@ void NetworkPluginServer::handleNewClientConnection(boost::shared_ptrconnection && (*it)->longRun == longRun) { + if ((*it)->willDie == false && (*it)->acceptUsers == acceptUsers && (*it)->users.size() < CONFIG_INT(m_config, "service.users_per_backend") && (*it)->connection && (*it)->longRun == longRun) { c = *it; // if we're not reusing all backends and backend is full, stop accepting new users on this backend if (!CONFIG_BOOL(m_config, "service.reuse_old_backends")) {