Commit Diff
- Commit:
bc9460900d1c5cb541e88c4c39cfa2fb9e8d28d8
- From:
- Omar Polo <op@omarpolo.com>
- Date:
- Message:
- 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.
- Actions:
- Patch | Tree
--- 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;