BUG/MEDIUM: apppet: Improve spinning loop detection with the new API
Conditions to detect the spinning loop for applets based on the new API are
not accurrate. We cannot continue to check the channel's buffers state to
know if an applet has made some progress. At least, we must also check the
applet's buffers.
After digging to find the right way to do, it was clear that the best is to
use something similar to what is performed for the streams, namely, checking
read and write events. And in fact, it is quite easy to do with the new
API. So let's do so.
This patch must be backported as far as 3.0.
(cherry picked from commit
54b7539d64d70f033955a0bfe7d0f19d7eef2328)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit
20623769917780b8fb7a01a7aa1a2539cc60961b)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit
ff753da75357e2595d69570b455f8c782297eb27)
Signed-off-by: Willy Tarreau <w@1wt.eu>