[virt-tools-list] [virt-viewer][PATCH] virt-viewer: set keepAlive on libvirt connection

Fabiano Fidêncio fidencio at redhat.com
Tue Jun 30 08:27:07 UTC 2015


From: Pavel Hrdina <phrdina at redhat.com>

Setting the keepAlive on libvirt connection is needed in order to
receive the CloseCallback event.

Resolves: rhbz#1164052
---
 src/virt-viewer.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/virt-viewer.c b/src/virt-viewer.c
index 637b9e4..851c83d 100644
--- a/src/virt-viewer.c
+++ b/src/virt-viewer.c
@@ -960,6 +960,10 @@ virt_viewer_connect(VirtViewerApp *app, GError **err)
         g_debug("Unable to register close callback on libvirt connection");
     }
 
+    if (virConnectSetKeepAlive(priv->conn, 5, 3) < 0) {
+        g_debug("Unable to set keep alive");
+    }
+
     return 0;
 }
 
-- 
2.4.4




More information about the virt-tools-list mailing list