From a8688aece33f2ada6a0e47d90c5702ad95a5a111 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 19 Sep 2016 23:44:25 +1000 Subject: [PATCH] Don't hang up immediately on epollhup if we still have epollin events --- src/generator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/generator.c b/src/generator.c index cb33cd8f..9ed5132a 100644 --- a/src/generator.c +++ b/src/generator.c @@ -2181,7 +2181,8 @@ static void *userproxy_recv(void *arg) if (unlikely(!proxy->authorised)) continue; - if (event.events & (EPOLLHUP | EPOLLERR | EPOLLRDHUP)) { + if ((event.events & (EPOLLHUP | EPOLLERR | EPOLLRDHUP)) && + !(event.events & EPOLLIN)) { LOGNOTICE("Proxy %d:%d %s hung up in epoll_wait", proxy->id, proxy->subid, proxy->url); disable_subproxy(gdata, proxy->parent, proxy);