mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 09:55:18 +00:00
rpc: Fix handling of non-blocking calls that could not be sent
When virNetClientIOEventLoop is called for a non-blocking call and not even a single byte can be sent from this call without blocking, we properly reported that to the caller which properly frees the call. But we never removed the call from a call queue.
This commit is contained in:
parent
3e1b2fab0c
commit
78965a33e8
@ -1256,7 +1256,12 @@ static int virNetClientIOEventLoop(virNetClientPtr client,
|
||||
/* We're not done, but we're non-blocking */
|
||||
if (thiscall->nonBlock) {
|
||||
virNetClientIOEventLoopPassTheBuck(client, thiscall);
|
||||
return thiscall->sentSomeData ? 1 : 0;
|
||||
if (thiscall->sentSomeData) {
|
||||
return 1;
|
||||
} else {
|
||||
virNetClientCallRemove(&client->waitDispatch, thiscall);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (fds[0].revents & (POLLHUP | POLLERR)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user