diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c index 43a9814b78dfeb76daee0a29d7b1a16048ebd3a9..727ed67ee866ac598dc7733c93a572d1b6c842c8 100644 --- a/src/rpc/virnetclient.c +++ b/src/rpc/virnetclient.c @@ -1205,7 +1205,10 @@ virNetClientIOHandleOutput(virNetClientPtr client) thecall = thecall->next; if (!thecall) - return -1; /* Shouldn't happen, but you never know... */ + return 0; /* This can happen if another thread raced with us and + * completed the call between the time this thread woke + * up from poll()ing and the time we locked the client + */ while (thecall) { ssize_t ret = virNetClientIOWriteMessage(client, thecall);