1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-23 21:34:54 +03:00

rpc: Really send non-blocking calls while waiting for another call

When another thread was dispatching while we wanted to send a
non-blocking call, we correctly queued the call and woke up the thread
but the thread just threw the call away since it forgot to recheck if
its socket was writable.
This commit is contained in:
Jiri Denemark 2011-11-28 17:41:25 +01:00
parent 2d0fc93fdd
commit 4e511fcc18

View File

@ -1381,6 +1381,16 @@ static int virNetClientIOEventLoop(virNetClientPtr client,
_("read on wakeup fd failed"));
goto error;
}
/* If we were woken up because a new non-blocking call was queued,
* we need to re-poll to check if we can send it.
*/
if (virNetClientCallMatchPredicate(client->waitDispatch,
virNetClientIOEventLoopWantNonBlock,
NULL)) {
VIR_DEBUG("New non-blocking call arrived; repolling");
continue;
}
}
if (ret < 0) {