X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fcollectd.c;h=a1e15bf1e7ca52b674632b1308012c91297d2c00;hb=70a5b80271643b3c0384e03a77fcfb35c11f726a;hp=ef2ccc75eca2bee5da721b5d2e2ba80132bda9f8;hpb=1ed0132c7c7962a5bec018faf0bb00db3a823396;p=collectd.git diff --git a/src/collectd.c b/src/collectd.c index ef2ccc75..a1e15bf1 100644 --- a/src/collectd.c +++ b/src/collectd.c @@ -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.");