mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 13:51:26 +02:00
MINOR: spoe: Don't close connection in sync mode on processing timeout
In sync mode, if an applet receives a ack while the processing delay has already expired, there is not frame waiting for this ack. But there is no reason to close the connection in this case. The ack may be ignored and the connection may be reused to process another frame. The only reason to trigger an error and close the connection is when the wrong ack is received while there is still a frame waiting for its ack. In sync mode, this should never happen. This patch may be backported in all versions supporting the SPOE.
This commit is contained in:
parent
cf181c76e3
commit
c7ba91039a
@ -1009,8 +1009,17 @@ spoe_handle_agentack_frame(struct appctx *appctx, struct spoe_context **ctx,
|
||||
(unsigned int)stream_id, (unsigned int)frame_id);
|
||||
|
||||
SPOE_APPCTX(appctx)->status_code = SPOE_FRM_ERR_FRAMEID_NOTFOUND;
|
||||
if (appctx->st0 == SPOE_APPCTX_ST_WAITING_SYNC_ACK)
|
||||
if (appctx->st0 == SPOE_APPCTX_ST_WAITING_SYNC_ACK) {
|
||||
/* Report an error if we are waiting the ack for another frame,
|
||||
* but not if there is no longer frame waiting for a ack
|
||||
* (timeout)
|
||||
*/
|
||||
if (!LIST_ISEMPTY(&SPOE_APPCTX(appctx)->waiting_queue) ||
|
||||
SPOE_APPCTX(appctx)->frag_ctx.ctx)
|
||||
return -1;
|
||||
appctx->st0 = SPOE_APPCTX_ST_PROCESSING;
|
||||
SPOE_APPCTX(appctx)->cur_fpa = 0;
|
||||
}
|
||||
return 0;
|
||||
|
||||
found:
|
||||
|
Loading…
x
Reference in New Issue
Block a user