From 996989687631a8a171fe34544c0534cfe3b2d870 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Wed, 20 Oct 2021 15:56:35 +1100 Subject: [PATCH] [host] app: zero the new client sub count If a new client connects but there has not been a capture timeout the new client count wont be zeroed on a valid capture. If there is a timeout later the host will still think there is a new client and re-send a frame when it should not. This fixes this by reading the value on a valid frame which zeros the new subs count. --- host/src/app.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/host/src/app.c b/host/src/app.c index 448acd8b..c907c0ab 100644 --- a/host/src/app.c +++ b/host/src/app.c @@ -185,6 +185,8 @@ static bool sendFrame(void) switch(app.iface->waitFrame(&frame, app.maxFrameSize)) { case CAPTURE_RESULT_OK: + // reading the new subs count zeros it + lgmpHostQueueNewSubs(app.frameQueue); break; case CAPTURE_RESULT_REINIT: