From: Erik Skultety Date: Wed, 20 Jul 2016 10:39:50 +0000 (+0200) Subject: rpc: virnetserver: Remove dead code checking the client limits X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=238b20b47f4be0299d364ec8907edf81e6b55183;p=libvirt.git rpc: virnetserver: Remove dead code checking the client limits 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 --- diff --git a/src/rpc/virnetserver.c b/src/rpc/virnetserver.c index 5b6bc4a555..f06643a65b 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;