Code

collectdctl command hangs on AIX and returns error 0 on Solaris.
[collectd.git] / src / utils_cmd_flush.c
index 3584f3b71a3c82bd73ec85cd55201422f8a8e1f8..c35aeb04c1b67b01f3a0cd857795f5944e1b1d44 100644 (file)
@@ -32,7 +32,8 @@
                WARNING ("handle_flush: failed to write to socket #%i: %s", \
                                fileno (fh), sstrerror (errno, errbuf, sizeof (errbuf))); \
                return -1; \
-       }
+       } \
+       fflush(fh);
 
 static int add_to_array (char ***array, int *array_num, char *value)
 {