From b82f2fd0da3c1f6a1d6e5ea9afaa4eb9a7ecec03 Mon Sep 17 00:00:00 2001 From: angt Date: Mon, 26 Oct 2015 10:45:09 +0100 Subject: [PATCH] Fix poll --- glorytun.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/glorytun.c b/glorytun.c index d602e39..bfd7824 100644 --- a/glorytun.c +++ b/glorytun.c @@ -377,12 +377,12 @@ int main (int argc, char **argv) printf("running...\n"); - while (running) { - struct pollfd fds[] = { - { .fd = tun.fd, .events = POLLIN }, - { .fd = sock.fd, .events = POLLIN }, - }; + struct pollfd fds[] = { + { .fd = tun.fd, .events = POLLIN }, + { .fd = sock.fd, .events = POLLIN }, + }; + while (running) { if (poll(fds, COUNT(fds), -1)==-1 && errno!=EINTR) { perror("poll"); return 1;