提交 16c6e2b4 编写于 作者: D Daniel P. Berrange

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
上级 d9709343
......@@ -1090,10 +1090,15 @@ static int virNetClientIO(virNetClientPtr client,
*/
virNetSocketUpdateIOCallback(client->sock, 0);
virResetLastError();
rv = virNetClientIOEventLoop(client, thiscall);
virNetSocketUpdateIOCallback(client->sock, VIR_EVENT_HANDLE_READABLE);
if (rv == 0 &&
virGetLastError())
rv = -1;
cleanup:
VIR_DEBUG("All done with our call %p %p %d", client->waitDispatch, thiscall, rv);
return rv;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册