handle EINTR and EAGAIN

Just do the call again instead of failing or logging an error.

Fixes #358
This commit is contained in:
Wim Taymans 2020-11-02 14:51:07 +01:00
parent 395a30b5d6
commit e094640c7b
8 changed files with 33 additions and 12 deletions

View file

@ -53,7 +53,9 @@ static gboolean source_dispatch (GSource *source, GSourceFunc callback, gpointer
int result;
pw_loop_enter (s->loop);
result = pw_loop_iterate (s->loop, 0);
do {
result = pw_loop_iterate (s->loop, 0);
} while (result == -EINTR || result == -EAGAIN);
pw_loop_leave (s->loop);
if (result < 0)