]> andersk Git - mod-vhost-ldap.git/commitdiff
Sleep intervals calculated as arithmetic row (sleep = sleep + num_of_tries)
authorOndřej Surý <ondrej@sury.org>
Tue, 8 Jun 2010 10:20:28 +0000 (12:20 +0200)
committerOndřej Surý <ondrej@sury.org>
Tue, 8 Jun 2010 11:14:28 +0000 (13:14 +0200)
mod_vhost_ldap.c

index 2c2d8472d7b6a50f2fab4516fd6e3db5d3b13c0c..9808a84c6c8f31147dc52a17f7d52984b6d33b96 100644 (file)
@@ -468,7 +468,7 @@ static int mod_vhost_ldap_translate_name(request_rec *r)
     char *cgi;
     const char *hostname = NULL;
     int is_fallback = 0;
-    int sleep = 1;
+    int sleep = 0;
 
     reqc =
        (mod_vhost_ldap_request_t *)apr_pcalloc(r->pool, sizeof(mod_vhost_ldap_request_t));
@@ -515,7 +515,7 @@ fallback:
         if (failures++ <= 5) {
            /* Back-off exponentially */
            apr_sleep(apr_time_from_sec(sleep));
-           sleep = sleep*2;
+           sleep = sleep+failures;
             goto start_over;
         } else {
            return HTTP_GATEWAY_TIME_OUT;
This page took 0.172115 seconds and 5 git commands to generate.