Skip to content

Commit

Permalink
Allow poll() to be interrupted
Browse files Browse the repository at this point in the history
  • Loading branch information
jedisct1 committed Aug 7, 2019
1 parent 06faa00 commit bdeb929
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vpn.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ static int event_loop(Context *context)
return -2;
}
if ((found_fds = poll(fds, POLLFD_COUNT, 1500)) == -1) {
return -1;
return errno == EINTR ? 0 : -1;
}
if (fds[POLLFD_LISTENER].revents & POLLIN) {
new_client_fd = tcp_accept(context, context->listen_fd);
Expand Down

0 comments on commit bdeb929

Please sign in to comment.