rpc: set listen backlog on FDs as well as on other sockets

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Martin Kletzander 2014-07-16 19:26:16 +02:00
parent 9805256d53
commit e1f2ec67c2
3 changed files with 7 additions and 1 deletions

View File

@ -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) {

View File

@ -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],

View File

@ -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);