loop: clear rmask after dispatching all sources

To make the unit tests work again.
This commit is contained in:
Wim Taymans 2023-05-05 18:36:08 +02:00
parent 93530df139
commit 4b5b94303e

View file

@ -475,11 +475,14 @@ static int loop_iterate(void *object, int timeout)
if (SPA_UNLIKELY(!spa_list_is_empty(&impl->destroy_list)))
process_destroy(impl);
for (i = 0; i < nfds; i++) {
struct spa_source *s = ep[i].data;
if (SPA_LIKELY(s && s->rmask))
s->func(s);
}
for (i = 0; i < nfds; i++) {
struct spa_source *s = ep[i].data;
if (SPA_LIKELY(s)) {
if (SPA_LIKELY(s->rmask))
s->func(s);
s->rmask = 0;
s->priv = NULL;
}