]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: contrib/prometheus-exporter: Don't try to add empty data blocks
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 4 Jul 2019 08:03:28 +0000 (10:03 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 5 Jul 2019 12:26:14 +0000 (14:26 +0200)
commit0c55a15ce17ac4ba97151acfcd2d9f54bfba1bc6
treeed1161af3e21e43507d5b3cc0677e29577afa610
parent1b9423d2141ee9e4d5bf0bb30346dbe95361ff88
BUG/MINOR: contrib/prometheus-exporter: Don't try to add empty data blocks

When the response buffer is full and nothing more can be inserted, it is
important to not try to insert an empty data block. Otherwise, when the function
channel_add_input() is called, the flag CF_READ_PARTIAL is set on the response
channel while nothing was read and the stream is uselessly woken up. Finally, we
have loop while the response buffer is full.

This patch must be backported to 2.0.
contrib/prometheus-exporter/service-prometheus.c