/* Wake the tasks which wants to read if the buffer contains data. */
if (!channel_is_empty(si_oc(si)))
notification_wake(&appctx->ctx.hlua_cosocket.wake_on_read);
+
+ /* Some data were injected in the buffer, notify the stream
+ * interface.
+ */
+ if (!channel_is_empty(si_ic(si)))
+ stream_int_update(si);
+
+ /* If write notifications are registered, we considers we want
+ * to write, so we set the flag cant put
+ */
+ if (notification_registered(&appctx->ctx.hlua_cosocket.wake_on_write))
+ si_applet_cant_put(si);
}
/* This function is called when the "struct stream" is destroyed.
}
/* update buffers. */
- stream_int_notify(&s->si[0]);
- stream_int_update_applet(&s->si[0]);
+ appctx_wakeup(appctx);
s->req.rex = TICK_ETERNITY;
s->res.wex = TICK_ETERNITY;