]> xenbits.xensource.com Git - libvirt.git/commitdiff
rpc: virnetserver: Remove dead code checking the client limits
authorErik Skultety <eskultet@redhat.com>
Wed, 20 Jul 2016 10:39:50 +0000 (12:39 +0200)
committerErik Skultety <eskultet@redhat.com>
Tue, 2 Aug 2016 12:51:13 +0000 (14:51 +0200)
Prior to commit 2737aaaf, we allowed every client to connect successfully,
however, if accepting a client would eventually lead to an overcommit of the
limits, we would disconnect it immediately with "Too many active clients,
dropping connection from...". Recent changes 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 wouldn't 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 <eskultet@redhat.com>
src/rpc/virnetserver.c

index 5b6bc4a555844376206cfb347fc31d87460b7c41..f06643a65b4afed16993fcf67d0f51284a4e1b35 100644 (file)
@@ -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;