]> granicus.if.org Git - postgresql/commitdiff
Fix stupid omission in c4901a1e.
authorAndres Freund <andres@anarazel.de>
Sat, 19 Mar 2016 05:35:43 +0000 (22:35 -0700)
committerAndres Freund <andres@anarazel.de>
Sat, 19 Mar 2016 05:37:59 +0000 (22:37 -0700)
Reported-By: Jeff Janes
Discussion: CAMkU=1zGxREwoyaCrp_CHadEB+dPgpVyKBysCJ+6xP9gCOvAuw@mail.gmail.com

src/backend/port/unix_latch.c

index 104401d0feb11122c023b60490b2d30434bc338c..63b76c650f03253e37cb43cc7bcdfcd22b3c3531 100644 (file)
@@ -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 */