diff --git a/src/collectd.c b/src/collectd.c
index ef2ccc75eca2bee5da721b5d2e2ba80132bda9f8..a1e15bf1e7ca52b674632b1308012c91297d2c00 100644 (file)
--- a/src/collectd.c
+++ b/src/collectd.c
continue;
}
continue;
}
- while (nanosleep (&ts_wait, &ts_wait) == -1)
+ while ((loop == 0) && (nanosleep (&ts_wait, &ts_wait) == -1))
{
if (errno != EINTR)
{
{
if (errno != EINTR)
{
#endif
start_client ();
#endif
start_client ();
+ plugin_shutdown_all ();
+
#if COLLECT_DEBUG
if (logfile != NULL)
DBG_STOPFILE("debug file closed.");
#if COLLECT_DEBUG
if (logfile != NULL)
DBG_STOPFILE("debug file closed.");