From bfb12c74fb605630fd45c2ff668f448ae9ba7659 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Tue, 11 Aug 2020 14:52:22 +1000 Subject: [PATCH] [client] be quicker at detecting restart and quieter about it --- VERSION | 2 +- client/src/main.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index d8fcfe2b..b9f3d06b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -B2-rc3-10-gda8b2d0cec+1 \ No newline at end of file +B2-rc3-11-gfa50b7824c+1 \ No newline at end of file diff --git a/client/src/main.c b/client/src/main.c index 91cd821f..527b5491 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -1500,6 +1500,9 @@ restart: if (!state.running) return -1; + // dont show warnings again after the first startup + waitCount = 100; + const bool magicMatches = memcmp(udata->magic, KVMFR_MAGIC, sizeof(udata->magic)) == 0; if (udataSize != sizeof(KVMFR) || !magicMatches || udata->version != KVMFR_VERSION) { @@ -1541,10 +1544,9 @@ restart: if (!lgmpClientSessionValid(state.lgmp)) { state.restart = true; - DEBUG_WARN("Session is invalid, has the host shutdown?"); break; } - SDL_WaitEventTimeout(NULL, 1000); + SDL_WaitEventTimeout(NULL, 100); } if (state.restart)