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) {