]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-master: stats_event_write() - Don't accumulate more than IO_BLOCK_SIZE bytes...
authorMarco Bettini <marco.bettini@open-xchange.com>
Thu, 23 Mar 2023 15:35:49 +0000 (15:35 +0000)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Thu, 24 Aug 2023 08:15:26 +0000 (08:15 +0000)
src/lib-master/stats-client.c

index e6b24c7257013bbcca0b63bebb590e639bdd7d4d..692d0d6107d5b6b22d3bfb2fd7e1cc0bc65270b0 100644 (file)
@@ -181,7 +181,7 @@ stats_event_write(struct stats_client *client,
        event_export(merged_event, str);
        str_append_c(str, '\n');
        event_unref(&merged_event);
-       if (flush_output) {
+       if (flush_output || str_len(str) >= IO_BLOCK_SIZE) {
                o_stream_nsend(client->conn.output, str_data(str), str_len(str));
                str_truncate(str, 0);
        }