diff --git a/linux/esptun.c b/linux/esptun.c index b23c6d9..7327714 100644 --- a/linux/esptun.c +++ b/linux/esptun.c @@ -540,7 +540,7 @@ int main(int argc, char **argv) fds[i].revents = 0; } - if (poll(fds, 2, 0) < 0) { + if (poll(fds, 2, -1) < 0) { perror("poll"); exit(1); } diff --git a/linux/term.c b/linux/term.c index 636f92e..0aa8f82 100644 --- a/linux/term.c +++ b/linux/term.c @@ -92,7 +92,7 @@ int main(int argc, char **argv) { fds[i].revents = 0; } - if (poll(fds, 2, 0) < 0) { + if (poll(fds, 2, -1) < 0) { fprintf(stderr, "Poll error: %s\n", strerror(errno)); exit(1); }