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.
1 file changed