From 674ec81cbc4a6cb61dcdfddea206148eef6fdf11 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 20 Feb 2024 10:34:13 -0500 Subject: [PATCH] MT#55283 reset read events after loop cap Partial backport of 6a8c523d5 If we hit the maximul allowed loop iterations when reading packets and end up aborting the loop, we must set active_read_events back to zero, so that the next time a read event is received we actually do the processing instead of thinking there's still an active thread. Change-Id: I2da17e67ab132ea2d3e1beb399c939195eeaa2f4 --- daemon/media_socket.c | 1 + 1 file changed, 1 insertion(+) diff --git a/daemon/media_socket.c b/daemon/media_socket.c index cb5106380..2b0ced44a 100644 --- a/daemon/media_socket.c +++ b/daemon/media_socket.c @@ -3149,6 +3149,7 @@ restart: ilog(LOG_ERROR | LOG_FLAG_LIMIT, "Too many packets in UDP receive queue (more than %d), " "aborting loop. Dropped packets possible", iters); g_atomic_int_inc(&sfd->error_strikes); + g_atomic_int_set(&sfd->active_read_events,0); goto strike; } #endif