]> 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>
Mon, 3 Apr 2023 04:41:44 +0000 (04:41 +0000)
src/lib-master/stats-client.c

index d210952e59ea456dd88cff10f64e6733e91721b7..f3b65644c0c39f3b5e0e25c8bef02bd6b04dbc73 100644 (file)
@@ -182,7 +182,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);
        }