Andres Freund <andres(at)anarazel(dot)de> writes:
> FWIW, the
> if (sock == PGINVALID_SOCKET)
> wakeEvents &= ~(WL_SOCKET_READABLE | WL_SOCKET_WRITEABLE);
> block in both latch implementations looks like a problem waiting to happen.
You think it should throw an error instead? Seems reasonable to me.
regards, tom lane