]> git.ipfire.org Git - thirdparty/libvirt.git/commit
client rpc: Report proper error for keepalive disconnections
authorJiri Denemark <jdenemar@redhat.com>
Fri, 11 Sep 2015 15:07:56 +0000 (17:07 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 23 Sep 2015 11:09:49 +0000 (13:09 +0200)
commitc91776d5ff9c99dbb711a7f21ecd526984f1806c
tree9232a7bfae6beb9cddb3796bc522331c0732d963
parent363995b02982771ad0e7a586520a232d1c383b91
client rpc: Report proper error for keepalive disconnections

Whenever a connection was closed due to keepalive timeout, we would log
a warning but the interrupted API would return rather useless generic
error:

    internal error: received hangup / error event on socket

Let's report a proper keepalive timeout error and make sure it is
propagated to all pending APIs. The error should be better now:

    internal error: connection closed due to keepalive timeout

Based on an old patch from Martin Kletzander.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
src/rpc/virkeepalive.c
src/rpc/virnetclient.c