]> xenbits.xensource.com Git - libvirt.git/commit
client: Report proper close reason
authorJiri Denemark <jdenemar@redhat.com>
Tue, 2 May 2017 14:39:57 +0000 (16:39 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Tue, 2 May 2017 16:53:24 +0000 (18:53 +0200)
commit42faf316ec9db2a1343088e12b70c2fd3a24cbe8
treef073505a1864a017dedc02153de6c5829ad69d97
parent59307fade86fb74db1f8f572433962233f7ac123
client: Report proper close reason

When we get a POLLHUP or VIR_EVENT_HANDLE_HANGUP event for a client, we
still want to read from the socket to process any accumulated data. But
doing so inevitably results in an error and a call to
virNetClientMarkClose before we get to processing the hangup event (and
another call to virNetClientMarkClose). However the close reason passed
to the second virNetClientMarkClose call is ignored because another one
was already set. We need to pass the correct close reason when marking
the socket to be closed for the first time.

https://bugzilla.redhat.com/show_bug.cgi?id=1373859

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