Code

Break out of the `nanosleep' loop if `loop' is set to non-zero.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Tue, 7 Nov 2006 19:52:29 +0000 (20:52 +0100)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Tue, 7 Nov 2006 19:52:29 +0000 (20:52 +0100)
src/collectd.c

index ef2ccc75eca2bee5da721b5d2e2ba80132bda9f8..64da57650a2627774e3cf3e78913b0f20810c6ee 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)
                        {