From 74657df77b0f3926a34279bc999c7c302a30bc59 Mon Sep 17 00:00:00 2001 From: Olaf Wintermann Date: Sun, 20 Feb 2022 10:49:37 +0100 Subject: [PATCH] fix poll return check in player event loop --- application/player.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/player.c b/application/player.c index d9a88ce..255f7cb 100644 --- a/application/player.c +++ b/application/player.c @@ -288,7 +288,7 @@ static void player_io(Player *p) { JSONParser *js = json_parser_new(); char buf[PLAYER_IN_BUFSIZE]; - while(p->isactive && poll(fds, 2, PLAYER_POLL_TIMEOUT)) { + while(p->isactive && (poll(fds, 2, PLAYER_POLL_TIMEOUT) >= 0)) { if(fds[0].revents == POLLIN) { ssize_t r; if((r = read(fds[0].fd, buf, PLAYER_IN_BUFSIZE)) <= 0) { -- 1.8.3.1