mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 21:34:54 +03:00
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 <eskultet@redhat.com>
This commit is contained in:
parent
e9ce8a7d24
commit
238b20b47f
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user