diff --git a/src/collectd.c b/src/collectd.c
index 98b9a1623f77b8840e6dbf36dbd7cfa4c69b2f1e..64da57650a2627774e3cf3e78913b0f20810c6ee 100644 (file)
--- a/src/collectd.c
+++ b/src/collectd.c
curtime = time (NULL);
/* Issue all plugins */
- plugin_read_all ();
+ plugin_read_all (&loop);
if (gettimeofday (&tv_now, NULL) < 0)
{
continue;
}
- while (nanosleep (&ts_wait, &ts_wait) == -1)
+ while ((loop == 0) && (nanosleep (&ts_wait, &ts_wait) == -1))
{
if (errno != EINTR)
{