summaryrefslogtreecommitdiffstats
path: root/src/applet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/applet.c')
-rw-r--r--src/applet.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/applet.c b/src/applet.c
index c528963..2bc3eb5 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -694,7 +694,7 @@ int appctx_fastfwd(struct stconn *sc, unsigned int count, unsigned int flags)
if (se_fl_test(appctx->sedesc, SE_FL_WANT_ROOM)) {
/* The applet request more room, report the info at the iobuf level */
- sdo->iobuf.flags |= IOBUF_FL_FF_BLOCKED;
+ sdo->iobuf.flags |= (IOBUF_FL_FF_BLOCKED|IOBUF_FL_FF_WANT_ROOM);
TRACE_STATE("waiting for more room", APPLET_EV_RECV|APPLET_EV_BLK, appctx);
}
@@ -716,8 +716,9 @@ int appctx_fastfwd(struct stconn *sc, unsigned int count, unsigned int flags)
/* else */
/* applet_have_more_data(appctx); */
- if (se_done_ff(sdo) != 0) {
- /* Something was forwarding, don't reclaim more room */
+ if (se_done_ff(sdo) != 0 || !(sdo->iobuf.flags & (IOBUF_FL_FF_BLOCKED|IOBUF_FL_FF_WANT_ROOM))) {
+ /* Something was forwarding or the consumer states it is not
+ * blocked anyore, don't reclaim more room */
se_fl_clr(appctx->sedesc, SE_FL_WANT_ROOM);
TRACE_STATE("more room available", APPLET_EV_RECV|APPLET_EV_BLK, appctx);
}