From: Marco Bettini Date: Thu, 23 Mar 2023 15:35:49 +0000 (+0000) Subject: lib-master: stats_event_write() - Don't accumulate more than IO_BLOCK_SIZE bytes... X-Git-Tag: 2.4.0~2821 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=831b43782cbedfe17304c6016bca521a988315f1;p=thirdparty%2Fdovecot%2Fcore.git lib-master: stats_event_write() - Don't accumulate more than IO_BLOCK_SIZE bytes in str buffer --- diff --git a/src/lib-master/stats-client.c b/src/lib-master/stats-client.c index d210952e59..f3b65644c0 100644 --- a/src/lib-master/stats-client.c +++ b/src/lib-master/stats-client.c @@ -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); }