From a4d8fd22370872c413b0ddfd827af0abdb2b6dee Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Sun, 10 Dec 2017 14:13:11 +1100 Subject: [PATCH] [client] added rate limiting to failed kicks (guest not ready) --- client/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/main.c b/client/main.c index fa411f0e..5fc4f6c8 100644 --- a/client/main.c +++ b/client/main.c @@ -218,7 +218,11 @@ int renderThread(void * unused) // we must take a copy of the header, both to let the guest advance and to // prevent the contained arguments being abused to overflow buffers memcpy(&header, state.shm, sizeof(struct KVMFRHeader)); - ivshmem_kick_irq(header.guestID, 0); + if (!ivshmem_kick_irq(header.guestID, 0)) + { + usleep(1000); + continue; + } // check the header's magic and version are valid if (