diff --git a/src/backend/storage/ipc/latch.c b/src/backend/storage/ipc/latch.c
index 42c2f52..3346fb6 100644
--- a/src/backend/storage/ipc/latch.c
+++ b/src/backend/storage/ipc/latch.c
@@ -863,6 +863,7 @@ WaitEventSetWait(WaitEventSet *set, long timeout,
 	instr_time	start_time;
 	instr_time	cur_time;
 	long		cur_timeout = -1;
+	WaitEvent	*event;
 
 	Assert(nevents > 0);
 
@@ -950,6 +951,8 @@ WaitEventSetWait(WaitEventSet *set, long timeout,
 				break;
 		}
 	}
+	event = &set->events[0];
+	event->events &= ~(WL_SOCKET_READABLE);
 #ifndef WIN32
 	waiting = false;
 #endif
