On Tue, Aug 31, 2021 at 9:29 AM Ruediger Pluem <rpl...@apache.org> wrote: > > On 8/30/21 8:04 PM, yla...@apache.org wrote: > > + > > + /* Flush any pending input data now, we don't know when > > + * the next POLLIN will trigger and retaining data > > might > > + * deadlock the underlying protocol. We don't check for > > + * pending data first with ap_filter_input_pending() > > since > > + * the read from proxy_tunnel_forward() is nonblocking > > + * anyway and returning OK if there's no data. > > + */ > > + rc = proxy_tunnel_forward(tunnel, in); > > + if (rc != OK) { > > + return rc; > > + } > > Don't we do all of this already a few lines above if > ap_filter_input_pending(in->c) == OK? > Why doing it again?
With whatever tc (client or origin connection), here on tc->rtnevents & POLLOUT we have out == tc and in == tc->other, so we forward potential pending input data from tc->other to tc (without waiting tc->other to become readable). Below with the same tc (same loop), if tc->rtnevents & POLLIN we forward from tc to tc->other, thus the opposite direction. Regards; Yann.