]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: spoe: Be sure to set tv_request when each message fragment is encoded
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 10 Apr 2019 12:47:18 +0000 (14:47 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 12 Apr 2019 19:33:52 +0000 (21:33 +0200)
When a message or a fragment is encoded, the date the frame processing starts
must be set if it is undefined. The test on tv_request field was wrong.

This patch must be backported to 1.9.

src/flt_spoe.c

index 703d6ba96dfe4e2e918d22a9433dd2609295cb59..1b517793eaa7b049d7c1d7038c86ebf04f4e4f11 100644 (file)
@@ -2674,8 +2674,8 @@ spoe_process_messages(struct stream *s, struct spoe_context *ctx,
        }
 
        if (ctx->state == SPOE_CTX_ST_ENCODING_MSGS) {
-               if (!tv_iszero(&ctx->stats.tv_request))
-                   ctx->stats.tv_request = now;
+               if (tv_iszero(&ctx->stats.tv_request))
+                       ctx->stats.tv_request = now;
                if (!spoe_acquire_buffer(&ctx->buffer, &ctx->buffer_wait))
                        goto out;
                ret = spoe_encode_messages(s, ctx, messages, dir, type);