mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-24 07:11:20 +02:00
BUG/MEDIUM: spoe: Return an error when the wrong ACK is received in sync mode
This is required to let a message processing timed out. Because, when it happens, there is no more context attached to the SPOE applet that sent the NOTIFY frame. So when the ACK is received, it is too late. This is the same situation when we receive the wrong ACK. It is invalid in sync mode. Otherwise, the SPOE applet remains in the state "WAITING_SYNC_ACK" until the idle timeout is reached. In such case, the applet is seen as busy and it is unusable. If this happens too often, more and more applets will be created because some others are blocked. If there is a maxconn on the SPOE backend, all processings will be drastically slowdown. Returning an error in such cases, in sync mode, allow us to terminate the SPOE applet. Because it means the agent is unresponsive or too slow. Note this bug exists only if the sync mode is used. This patch must be backported in 1.8.
This commit is contained in:
parent
44e609bfa5
commit
3a47e5e25c
@ -1030,6 +1030,8 @@ spoe_handle_agentack_frame(struct appctx *appctx, struct spoe_context **ctx,
|
|||||||
(unsigned int)stream_id, (unsigned int)frame_id);
|
(unsigned int)stream_id, (unsigned int)frame_id);
|
||||||
|
|
||||||
SPOE_APPCTX(appctx)->status_code = SPOE_FRM_ERR_FRAMEID_NOTFOUND;
|
SPOE_APPCTX(appctx)->status_code = SPOE_FRM_ERR_FRAMEID_NOTFOUND;
|
||||||
|
if (appctx->st0 == SPOE_APPCTX_ST_WAITING_SYNC_ACK)
|
||||||
|
return -1;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
found:
|
found:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user