Code

email plugin: Added some information about this plugin and it's config options to...
[collectd.git] / src / collectd.c
index ef2ccc75eca2bee5da721b5d2e2ba80132bda9f8..a1e15bf1e7ca52b674632b1308012c91297d2c00 100644 (file)
@@ -207,7 +207,7 @@ static int start_client (void)
                        continue;
                }
 
-               while (nanosleep (&ts_wait, &ts_wait) == -1)
+               while ((loop == 0) && (nanosleep (&ts_wait, &ts_wait) == -1))
                {
                        if (errno != EINTR)
                        {
@@ -444,6 +444,8 @@ int main (int argc, char **argv)
 #endif
                start_client ();
 
+       plugin_shutdown_all ();
+
 #if COLLECT_DEBUG
        if (logfile != NULL)
                DBG_STOPFILE("debug file closed.");