Sleep for 150ms instead of 2s when acquiring initial tokens
[hcoop/debian/libapache-mod-waklog.git] / mod_waklog.c
index 6a783b2..0a7b693 100644 (file)
@@ -48,6 +48,7 @@ module waklog_module;
 #include "http_connection.h"
 #include <apr_strings.h>
 #include <apr_base64.h>
+#include <apr_time.h>
 #define ap_pcalloc apr_pcalloc
 #define ap_pdupstr apr_pdupstr
 #define ap_pstrdup apr_pstrdup
@@ -1392,7 +1393,7 @@ waklog_init_handler (apr_pool_t * p, apr_pool_t * plog,
         /* wait here until our child process has gone and done it's renewing thing. */
         while( sharedspace->renewcount == oldrenewcount  ) {
           log_error( APLOG_MARK, APLOG_ERR, 0, s, "mod_waklog: waiting for tokens..." );
-          sleep(2);
+          apr_sleep(150000);
         }
       }