On 2015-12-30 12:41:56 -0500, Tom Lane wrote:
> Andres Freund <andres@anarazel.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.
Yea. Error or maybe just an assert. That path seems to always indicate
something having gone wrong.