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 ef2ccc7..64da576 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)
                        {