[libvirt] [PATCH 5/5] rpc: virnetserver: Remove dead code checking the client limits
John Ferlan
jferlan at redhat.com
Sat Jul 30 13:44:23 UTC 2016
On 07/20/2016 06:53 AM, Erik Skultety wrote:
> 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
Are these two commit id's from your local branch? EG, the previous two
commits? I assume so, since they weren't found... Perhaps change the
text to indicate "recent adjustments" or push the first four, get their
upsteam commit id's and then replace these two with the "real" ones.
John
> 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 <eskultet at 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;
>
>
More information about the libvir-list
mailing list