]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: channels: Don't forget to reset output in channel_erase().
authorOlivier Houchard <cognet@ci0.org>
Wed, 1 May 2019 22:58:53 +0000 (00:58 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 2 May 2019 08:40:59 +0000 (10:40 +0200)
In channel_erase(), don't forget to set output to 0, otherwise the
channel won't seem empty, when it really is, and that could lead to
stream never closing properly.

This should be backported to 1.9.

include/proto/channel.h

index cf85058997399660d97894fb0d010d6da08272e7..b2cd5c37456f562373a839b1465e1e5ba11e6734 100644 (file)
@@ -545,6 +545,7 @@ static inline void channel_check_timeouts(struct channel *chn)
 static inline void channel_erase(struct channel *chn)
 {
        chn->to_forward = 0;
+       chn->output = 0;
        b_reset(&chn->buf);
 }