From: Christopher Faulet Date: Thu, 26 Apr 2018 09:33:44 +0000 (+0200) Subject: BUG/MINOR: spoe: Fix counters update when processing is interrupted X-Git-Tag: v1.9-dev1~289 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebe1399efe6494e5327160d574b0f1f563d9ee87;p=thirdparty%2Fhaproxy.git BUG/MINOR: spoe: Fix counters update when processing is interrupted When the processing is interrupted, because of a typo, was incremented instead of decremented. --- diff --git a/src/flt_spoe.c b/src/flt_spoe.c index 7c019c4125..40cdd6916d 100644 --- a/src/flt_spoe.c +++ b/src/flt_spoe.c @@ -2597,7 +2597,7 @@ spoe_stop_processing(struct spoe_agent *agent, struct spoe_context *ctx) if (!LIST_ISEMPTY(&ctx->list)) { if (ctx->state == SPOE_CTX_ST_SENDING_MSGS) - HA_ATOMIC_ADD(&agent->counters.nb_sending, 1); + HA_ATOMIC_SUB(&agent->counters.nb_sending, 1); else HA_ATOMIC_SUB(&agent->counters.nb_waiting, 1);