When a peer applet is pushing updates, we limit the number of update sent at
once via a global parameter to not spend too much time in the applet. On
interrupt, we claimed for more room to be woken up quickly. However, this
statement is only true if something was pushed in the buffer. Otherwise,
with an empty buffer, if the stream itself is not woken up, the applet
remains also blocked because there is no send activity on the other side to
unblock it.
In this case, instead of requesting more room, it is sufficient to state the
applet have more data to send.
This patch must be backported as far as 2.6.
updates_sent++;
if (updates_sent >= peers_max_updates_at_once) {
- /* pretend we're full so that we get back ASAP */
- struct stconn *sc = appctx_sc(appctx);
-
- sc_need_room(sc, 0);
+ applet_have_more_data(appctx);
ret = -1;
break;
}
updates++;
if (updates >= peers_max_updates_at_once) {
- /* pretend we're full so that we get back ASAP */
- struct stconn *sc = appctx_sc(appctx);
-
- sc_need_room(sc, 0);
+ applet_have_more_data(appctx);
return -1;
}