When we use select(), an error event on a file descriptor causes it to
be reported as readable, and some of the handlers will only clean it up
if that happens. So set the 'readable' flag on EPOLLERR too.
This is part of #389.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
nfds = 0;
}
while (nfds--) {
- if (evs[nfds].events & EPOLLIN) {
+ if (evs[nfds].events & (EPOLLIN|EPOLLERR)) {
if (evs[nfds].data.fd == vpninfo->tun_fd)
tun_r = 1;
else if (evs[nfds].data.fd == vpninfo->ssl_fd)