On Fri, Jun 11, 2021 at 9:24 PM Thomas Munro <thomas.mu...@gmail.com> wrote:
> On Fri, Apr 30, 2021 at 2:23 PM Thomas Munro <thomas.mu...@gmail.com> > wrote: > > Here's something I wanted to park here to look into for the next > > cycle: it turns out that kqueue's EV_EOF flag also has the right > > semantics for this. That leads to the idea of exposing the event via > > the WaitEventSet API, and would the bring > > client_connection_check_interval feature to 6/10 of our OSes, up from > > 2/10. Maybe Windows' FD_CLOSE event could get us up to 7/10, not > > sure. > > Rebased. Added documentation tweak and a check to reject the GUC on > unsupported OSes. > Hi, - Assert(count > 0); + /* For WL_SOCKET_READ -> WL_SOCKET_CLOSED, no change needed. */ + if (count == 0) + return; + Assert(count <= 2); It seems that the remaining Assert() should say 1 <= count && count <= 2 +#ifdef POLLRDHUP + if ((cur_event->events & WL_SOCKET_CLOSED) && + (cur_pollfd->revents & (POLLRDHUP | errflags))) It seems the last condition above should be written as: ((cur_pollfd->revents & POLLRDHUP) | (cur_pollfd->revents & errflags)) Cheers