aboutsummaryrefslogtreecommitdiff
path: root/src/backend/port/unix_latch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/port/unix_latch.c')
-rw-r--r--src/backend/port/unix_latch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/port/unix_latch.c b/src/backend/port/unix_latch.c
index 104401d0feb..63b76c650f0 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 */