[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libvir] PATCH: Force close of virConnectPtr if client quits abnormally

Daniel P. Berrange wrote:
If a remote client quits abnormally (or if the server forcably drops a
client for misbehaviing), it is possible that the virConnectPtr object
is not closed. This leads to a build up of active connections in the
server. The attached patch simply calls virConnectClose when killing off
a client connection if there is a non-NULL client->conn object.



diff -u -p -r1.52 qemud.c
--- qemud/qemud.c	26 Jun 2007 23:48:47 -0000	1.52
+++ qemud/qemud.c	11 Jul 2007 23:37:10 -0000
@@ -1023,6 +1036,9 @@ static void qemudDispatchClientFailure(s
virEventRemoveHandleImpl(client->fd); + if (client->conn)
+        virConnectClose(client->conn);
     if (client->tls && client->session) gnutls_deinit (client->session);



Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]