Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/locking/lock_daemon.c | 2 +-
src/rpc/virnetserverservice.c | 5 +++++
src/rpc/virnetserverservice.h | 1 +
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c
index e9219d5..02d77e3 100644
--- a/src/locking/lock_daemon.c
+++ b/src/locking/lock_daemon.c
@@ -614,7 +614,7 @@ virLockDaemonSetupNetworkingSystemD(virNetServerPtr srv)
#if WITH_GNUTLS
NULL,
#endif
- false, 1)))
+ false, 0, 1)))
return -1;
if (virNetServerAddService(srv, svc, NULL) < 0) {
diff --git a/src/rpc/virnetserverservice.c b/src/rpc/virnetserverservice.c
index e85889b..fea05c3 100644
--- a/src/rpc/virnetserverservice.c
+++ b/src/rpc/virnetserverservice.c
@@ -133,6 +133,7 @@ virNetServerServiceNewFDOrUNIX(const char *path,
tls,
#endif
readonly,
+ max_queued_clients,
nrequests_client_max);
}
}
@@ -265,6 +266,7 @@ virNetServerServicePtr virNetServerServiceNewFD(int fd,
virNetTLSContextPtr tls,
#endif
bool readonly,
+ size_t max_queued_clients,
size_t nrequests_client_max)
{
virNetServerServicePtr svc;
@@ -292,6 +294,9 @@ virNetServerServicePtr virNetServerServiceNewFD(int fd,
goto error;
for (i = 0; i < svc->nsocks; i++) {
+ if (virNetSocketListen(svc->socks[i], max_queued_clients) < 0)
+ goto error;
+
/* IO callback is initially disabled, until we're ready
* to deal with incoming clients */
if (virNetSocketAddIOCallback(svc->socks[i],
diff --git a/src/rpc/virnetserverservice.h b/src/rpc/virnetserverservice.h
index a1c8960..b1d6c2d 100644
--- a/src/rpc/virnetserverservice.h
+++ b/src/rpc/virnetserverservice.h
@@ -74,6 +74,7 @@ virNetServerServicePtr virNetServerServiceNewFD(int fd,
virNetTLSContextPtr tls,
# endif
bool readonly,
+ size_t max_queued_clients,
size_t nrequests_client_max);
virNetServerServicePtr virNetServerServiceNewPostExecRestart(virJSONValuePtr object);
--
2.0.2