ap

An audio player suited to my tastes
Log | Files | Refs | README | LICENSE

commit e6262e9936dbe1184537d208acaaffbf48e7e7d5
parent 51e1986236a09dc59ed6da549b2bfe8b3b64332c
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date:   Sat, 29 May 2021 01:33:51 -0700

Add timeout to server polling

Diffstat:
Maps.c | 2+-
Mconfig.def.h | 2++
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/aps.c b/aps.c @@ -80,7 +80,7 @@ aps_accept(struct aps *aps) pfd.events = POLLIN; pfd.fd = aps->con.s; - r = poll(&pfd, 1, aps->nfds ? 0 : INFTIM); + r = poll(&pfd, 1, aps->nfds ? timeout : INFTIM); if (r <= 0) return r; diff --git a/config.def.h b/config.def.h @@ -3,3 +3,5 @@ static char *player[] = { /* prog, arg, ... */ "ffplay", "apsplayer", "-loglevel", "error", "-nodisp", "-autoexit", "", NULL }; + +static int timeout = 250;