diff --git a/sndiod/listen.c b/sndiod/listen.c index 5f0ee1c..ee06643 100644 --- a/sndiod/listen.c +++ b/sndiod/listen.c @@ -217,7 +217,8 @@ listen_pollfd(void *arg, struct pollfd *pfd) { struct listen *f = arg; - if (file_slowaccept) + f->slowaccept = file_slowaccept; + if (f->slowaccept) return 0; pfd->fd = f->fd; pfd->events = POLLIN; @@ -227,6 +228,10 @@ listen_pollfd(void *arg, struct pollfd *pfd) int listen_revents(void *arg, struct pollfd *pfd) { + struct listen *f = arg; + + if (f->slowaccept) + return 0; return pfd->revents; } diff --git a/sndiod/listen.h b/sndiod/listen.h index c64aeca..d53e9f3 100644 --- a/sndiod/listen.h +++ b/sndiod/listen.h @@ -24,6 +24,7 @@ struct listen { struct file *file; char *path; int fd; + int slowaccept; }; extern struct listen *listen_list;