]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: spoe: Don't release the context buffer in .check_timeouts callbaclk
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 20 Mar 2018 15:09:20 +0000 (16:09 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 5 Apr 2018 13:13:53 +0000 (15:13 +0200)
It is better to let spoe_stop_processing release this buffer because, in
.check_timeouts callback, we lack information to know if it should be release or
not. For instance, if the processing timeout is reached while the SPOE applet
receives the reply, it is preferable to ignore the timeout and process the
result.

This patch should be backported in 1.8.

src/flt_spoe.c

index 9d5b3b88a5963594274aee599006d24964235009..5dba391a00781bb14ba33e3bf8ab1cbdab70ddff 100644 (file)
@@ -2969,10 +2969,8 @@ spoe_check_timeouts(struct stream *s, struct filter *filter)
 {
        struct spoe_context *ctx = filter->ctx;
 
-       if (tick_is_expired(ctx->process_exp, now_ms)) {
+       if (tick_is_expired(ctx->process_exp, now_ms))
                s->pending_events |= TASK_WOKEN_MSG;
-               spoe_release_buffer(&ctx->buffer, &ctx->buffer_wait);
-       }
 }
 
 /* Called when we are ready to filter data on a channel */