commit bc9460900d1c5cb541e88c4c39cfa2fb9e8d28d8 from: Omar Polo date: Sun Feb 26 20:30:37 2023 UTC retry on sio_revents failure due to EAGAIN I've noticed that often during the suspend/resume cycle amused could die due to a "sndio hang-up" caused by an EAGAIN. This should prevent that and make sure we retry the operation. commit - 15decef243429c2973b338ff3b01f95ac90dd555 commit + bc9460900d1c5cb541e88c4c39cfa2fb9e8d28d8 blob - b1083ef3705605d82c0c9b4467fb233180d2138e blob + 3515cff5b905accb295d7b7c3e37cf0bcb6a37af --- player.c +++ player.c @@ -323,8 +323,11 @@ play(const void *buf, size_t len, int64_t *s) } revents = sio_revents(hdl, player_pfds + 1); - if (revents & POLLHUP) + if (revents & POLLHUP) { + if (errno == EAGAIN) + continue; fatal("sndio hang-up"); + } if (revents & POLLOUT) { w = sio_write(hdl, buf, len); len -= w;