Don't reset the counter every loop
authorSteve McIntyre <steve@einval.com>
Tue, 6 Nov 2018 17:00:12 +0000 (17:00 +0000)
committerSteve McIntyre <steve@einval.com>
Tue, 6 Nov 2018 17:00:12 +0000 (17:00 +0000)
bin/build-client

index 8ec71b5..ef3b147 100755 (executable)
@@ -92,11 +92,11 @@ SLEEP_TIME=$SLEEP_NO_JOB_DEFAULT
 
 START_TIME=$(date +'%s')
 
 
 START_TIME=$(date +'%s')
 
-while true; do
-    # How many times in a row have we asked for a job and not got
-    # anything? If this gets high, back off
-    NO_JOBS_COUNT=0
+# How many times in a row have we asked for a job and not got
+# anything? If this gets high, back off
+NO_JOBS_COUNT=0
 
 
+while true; do
     if [ -f /chroot/rebuildd/EXIT ]; then
        echo "Found EXIT file, stopping here"
        exit 0
     if [ -f /chroot/rebuildd/EXIT ]; then
        echo "Found EXIT file, stopping here"
        exit 0