On Thu, Mar 10, 2016 at 05:53:56AM +0100, Martin Kletzander wrote: > virHashForEach() returns 0 if everything went ince, so our session > daemon was timing out even when there was a client connected. > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1315606 Can confirm your patch fixes this bug -- tested on F23 with the libvirt packages from Rawhide with this fix. $ rpm -q libvirt libvirt-1.3.2-2.fc25.x86_64 $ rpm -q libvirt --changelog | head -2 * Wed Mar 09 2016 Richard W.M. Jones <rjones@xxxxxxxxxx> - 1.3.2-2 - Add fix for RHBZ#1315606. > Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx> FWIW: Tested-by: Kashyap Chamarthy <kchamart@xxxxxxxxxx> > --- > src/rpc/virnetdaemon.c | 14 +++++++++++--- > 1 file changed, 11 insertions(+), 3 deletions(-) > > diff --git a/src/rpc/virnetdaemon.c b/src/rpc/virnetdaemon.c > index 8ddcd9baddc9..9181ad7c474b 100644 > --- a/src/rpc/virnetdaemon.c > +++ b/src/rpc/virnetdaemon.c > @@ -849,15 +849,23 @@ virNetDaemonClose(virNetDaemonPtr dmn) > static int > daemonServerHasClients(void *payload, > const void *key ATTRIBUTE_UNUSED, > - void *opaque ATTRIBUTE_UNUSED) > + void *opaque) > { > + bool *clients = opaque; > virNetServerPtr srv = payload; > > - return virNetServerHasClients(srv); > + if (virNetServerHasClients(srv)) > + *clients = true; > + > + return 0; > } > > bool > virNetDaemonHasClients(virNetDaemonPtr dmn) > { > - return virHashForEach(dmn->servers, daemonServerHasClients, NULL) > 0; > + bool ret = false; > + > + virHashForEach(dmn->servers, daemonServerHasClients, &ret); > + > + return ret; > } > -- > 2.7.2 > > -- > libvir-list mailing list > libvir-list@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/libvir-list -- /kashyap -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list