__FUNCTION__,
si, si->state, ic->flags, si_oc(si)->flags);
- if (ic->flags & (CF_SHUTR|CF_DONT_READ))
- return;
-
if (!channel_may_recv(ic) || ic->pipe) {
/* stop reading */
si->flags |= SI_FL_WAIT_ROOM;
if (!(si->wait_event.wait_reason & SUB_CAN_SEND) && co_data(si_oc(si)))
ret = si_cs_send(cs);
- if (!(si->wait_event.wait_reason & SUB_CAN_RECV))
+ if (!(si->wait_event.wait_reason & SUB_CAN_RECV)) {
ret |= si_cs_recv(cs);
+ if (!(si_ic(si)->flags & (CF_SHUTR|CF_DONT_READ)))
+ si->flags |= SI_FL_WANT_PUT;
+ }
if (ret != 0)
si_cs_process(cs);
struct channel *oc = si_oc(si);
if (!(ic->flags & CF_SHUTR)) {
+ if (!(ic->flags & CF_DONT_READ))
+ si_want_put(si);
+
/* Read not closed, update FD status and timeout for reads */
if ((ic->flags & CF_DONT_READ) || !channel_may_recv(ic)) {
/* stop reading */
{
struct channel *ic = si_ic(si);
- if (ic->flags & CF_SHUTR)
- return;
-
- if ((ic->flags & CF_DONT_READ) || !channel_may_recv(ic)) {
+ if (!channel_may_recv(ic)) {
/* stop reading */
si->flags |= SI_FL_WAIT_ROOM;
}
__FUNCTION__,
si, si->state, ic->flags, si_oc(si)->flags);
- if (ic->flags & (CF_SHUTR|CF_DONT_READ))
- return;
-
if (channel_may_recv(ic) && !ic->pipe) {
/* (re)start reading */
appctx_wakeup(si_appctx(si));