diff --git a/src/flt_spoe.c b/src/flt_spoe.c index a53795861..a701c7074 100644 --- a/src/flt_spoe.c +++ b/src/flt_spoe.c @@ -1843,6 +1843,8 @@ spoe_handle_appctx(struct appctx *appctx) goto switchstate; case SPOE_APPCTX_ST_IDLE: + SPOE_DEBUG_STMT(agent->rt[tid].applets_idle--); + eb32_delete(&SPOE_APPCTX(appctx)->node); if (stopping && LIST_ISEMPTY(&agent->rt[tid].sending_queue) && LIST_ISEMPTY(&SPOE_APPCTX(appctx)->waiting_queue)) { @@ -1851,8 +1853,6 @@ spoe_handle_appctx(struct appctx *appctx) appctx->st0 = SPOE_APPCTX_ST_DISCONNECT; goto switchstate; } - SPOE_DEBUG_STMT(agent->rt[tid].applets_idle--); - eb32_delete(&SPOE_APPCTX(appctx)->node); appctx->st0 = SPOE_APPCTX_ST_PROCESSING; /* fall through */