mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
Fix propagation of RPC errors from streams
If a streams error is raised, virNetClientIOEventLoop returns 0, but an error is set. Check for this and propagate it if present * src/rpc/virnetclient.c: Propagate streams error
This commit is contained in:
parent
d97093437f
commit
16c6e2b41e
@ -1090,10 +1090,15 @@ static int virNetClientIO(virNetClientPtr client,
|
|||||||
*/
|
*/
|
||||||
virNetSocketUpdateIOCallback(client->sock, 0);
|
virNetSocketUpdateIOCallback(client->sock, 0);
|
||||||
|
|
||||||
|
virResetLastError();
|
||||||
rv = virNetClientIOEventLoop(client, thiscall);
|
rv = virNetClientIOEventLoop(client, thiscall);
|
||||||
|
|
||||||
virNetSocketUpdateIOCallback(client->sock, VIR_EVENT_HANDLE_READABLE);
|
virNetSocketUpdateIOCallback(client->sock, VIR_EVENT_HANDLE_READABLE);
|
||||||
|
|
||||||
|
if (rv == 0 &&
|
||||||
|
virGetLastError())
|
||||||
|
rv = -1;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_DEBUG("All done with our call %p %p %d", client->waitDispatch, thiscall, rv);
|
VIR_DEBUG("All done with our call %p %p %d", client->waitDispatch, thiscall, rv);
|
||||||
return rv;
|
return rv;
|
||||||
|
Loading…
Reference in New Issue
Block a user