[gatekeeper] fix error computing retry timeout

Change-Id: Ic31687f3c35f1548a013267bc3169a5f4455a59c
diff --git a/gatekeeper.cpp b/gatekeeper.cpp
index 4899661..5ea7f7c 100644
--- a/gatekeeper.cpp
+++ b/gatekeeper.cpp
@@ -243,12 +243,15 @@
 }
 
 uint32_t GateKeeper::ComputeRetryTimeout(const failure_record_t *record) {
+    static const int failure_timeout_ms = 30000;
+    if (record->failure_counter == 0) return 0;
+
     if (record->failure_counter > 0 && record->failure_counter <= 10) {
         if (record->failure_counter % 5 == 0) {
-            return 30000;
+            return failure_timeout_ms;
         }
     } else {
-        return 30000;
+        return failure_timeout_ms;
     }
     return 0;
 }