From ce43942cbe7f18d14f8beefe348965cec63d150d Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Mon, 26 Jun 2017 16:57:23 +0200 Subject: [PATCH] Respond to socket errors --- src/extension/poll_eventloop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/extension/poll_eventloop.c b/src/extension/poll_eventloop.c index cb629d18..e796de10 100644 --- a/src/extension/poll_eventloop.c +++ b/src/extension/poll_eventloop.c @@ -435,13 +435,13 @@ poll_eventloop_run_once(getdns_eventloop *loop, int blocking) poll_loop->pfds[i].fd = -1; } if (poll_loop->fd_events[j].event->write_cb && - poll_loop->pfds[j].revents & POLLOUT) + poll_loop->pfds[j].revents & (POLLOUT|POLLERR|POLLHUP|POLLNVAL)) poll_write_cb( poll_loop->pfds[j].fd , poll_loop->fd_events[j].event); if (poll_loop->fd_events[j].event && poll_loop->fd_events[j].event->read_cb && - poll_loop->pfds[j].revents & POLLIN) + poll_loop->pfds[j].revents & (POLLIN|POLLERR|POLLHUP|POLLNVAL)) poll_read_cb( poll_loop->pfds[j].fd , poll_loop->fd_events[j].event); }