Browse Source

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
pull/1887/head
Richard Fuchs 2 years ago
parent
commit
b252da7c26
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      daemon/media_socket.c

+ 1
- 0
daemon/media_socket.c View File

@ -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


Loading…
Cancel
Save