Prior to commit 2737aaaf, we allowed every client to connect successfully,
however, if accepting the client would eventually lead to an overcommit of the
limits, we would disconnect it immediately with "Too many active clients,
dropping connection from...". Commits 4d693241 and e34fbb9e refactored
the code in a way, that it is not possible for the client-related callback to
be dispatched and the client to be accepted if the limits would permit to do
so, therefore a check if a connection should be dropped due to limits violation
has become a dead code that could be removed.

Signed-off-by: Erik Skultety <eskul...@redhat.com>
---
 src/rpc/virnetserver.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/src/rpc/virnetserver.c b/src/rpc/virnetserver.c
index 5b6bc4a..f06643a 100644
--- a/src/rpc/virnetserver.c
+++ b/src/rpc/virnetserver.c
@@ -279,13 +279,6 @@ int virNetServerAddClient(virNetServerPtr srv,
 {
     virObjectLock(srv);
 
-    if (srv->nclients >= srv->nclients_max) {
-        virReportError(VIR_ERR_RPC,
-                       _("Too many active clients (%zu), dropping connection 
from %s"),
-                       srv->nclients_max, 
virNetServerClientRemoteAddrStringURI(client));
-        goto error;
-    }
-
     if (virNetServerClientInit(client) < 0)
         goto error;
 
-- 
2.5.5

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to