From: Andres Freund Date: Sat, 19 Mar 2016 05:35:43 +0000 (-0700) Subject: Fix stupid omission in c4901a1e. X-Git-Tag: REL9_6_BETA1~438 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6eb2be15b5d24b98d334a9dd637f0edb37e2eb7e;p=postgresql Fix stupid omission in c4901a1e. Reported-By: Jeff Janes Discussion: CAMkU=1zGxREwoyaCrp_CHadEB+dPgpVyKBysCJ+6xP9gCOvAuw@mail.gmail.com --- diff --git a/src/backend/port/unix_latch.c b/src/backend/port/unix_latch.c index 104401d0fe..63b76c650f 100644 --- a/src/backend/port/unix_latch.c +++ b/src/backend/port/unix_latch.c @@ -389,7 +389,7 @@ WaitLatchOrSocket(volatile Latch *latch, int wakeEvents, pgsocket sock, /* socket is writable */ result |= WL_SOCKET_WRITEABLE; } - if ((wakeEvents & WL_SOCKET_WRITEABLE) && + if ((wakeEvents & (WL_SOCKET_READABLE | WL_SOCKET_WRITEABLE)) && (pfds[1].revents & (POLLHUP | POLLERR | POLLNVAL))) { /* EOF/error condition */