From bb85f2298e63b55b0465cb9e1f790019e99611dd Mon Sep 17 00:00:00 2001 From: Jiri Denemark Date: Tue, 12 Jun 2012 09:01:49 +0200 Subject: rpc: Do not use timer for sending keepalive responses When a libvirt API is called from the main event loop (which seems to be common in event-based glib apps), the client IO loop would properly handle keepalive requests sent by a server but will not actually send them because the main event loop is blocked with the API. This patch gets rid of response timer and the thread which is processing keepalive requests is also responsible for queueing responses for delivery. --- src/rpc/virkeepalive.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/rpc/virkeepalive.h') diff --git a/src/rpc/virkeepalive.h b/src/rpc/virkeepalive.h index 09264a507..62227d068 100644 --- a/src/rpc/virkeepalive.h +++ b/src/rpc/virkeepalive.h @@ -55,6 +55,7 @@ int virKeepAliveTimeout(virKeepAlivePtr ka); bool virKeepAliveTrigger(virKeepAlivePtr ka, virNetMessagePtr *msg); bool virKeepAliveCheckMessage(virKeepAlivePtr ka, - virNetMessagePtr msg); + virNetMessagePtr msg, + virNetMessagePtr *response); #endif /* __VIR_KEEPALIVE_H__ */ -- cgit v1.2.3-65-gdbad