summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1cdf817)
raw | patch | inline | side by side (parent: 1cdf817)
author | Cyril Feraudet <cyril@feraudet.com> | |
Mon, 19 Mar 2012 10:08:06 +0000 (11:08 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Wed, 21 Mar 2012 17:15:52 +0000 (18:15 +0100) |
When we use a "MaxPacketSize" over two thousand of octets (to pass huge
message in notification for example), buffer may not be flushed for a
while.
By flushing buffer when there is about 1400 octets, we're sure there is
no data too longer in.
message in notification for example), buffer may not be flushed for a
while.
By flushing buffer when there is about 1400 octets, we're sure there is
no data too longer in.
src/network.c | patch | blob | history |
diff --git a/src/network.c b/src/network.c
index 06cc2c5012554dfae90be5c2c8411574cb3039ba..f7f47c7ac4a6d2086f368463b1a13f11bcd60c1d 100644 (file)
--- a/src/network.c
+++ b/src/network.c
ERROR ("network plugin: Unable to append to the "
"buffer for some weird reason");
}
- else if ((network_config_packet_size - send_buffer_fill) < 15)
+ else if (send_buffer_fill >= 1452 - 15)
{
flush_buffer ();
}