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.3.21~45 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6231b7af67d33feec74b0b9d61c16c84413be639;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 e6b24c7257..692d0d6107 100644 --- a/src/lib-master/stats-client.c +++ b/src/lib-master/stats-client.c @@ -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); }