From 1f11ad82886aa14d4aae6b9a7c04ad416a9dcb98 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 19 Dec 2007 15:07:20 +0100 Subject: [PATCH] advapi32: Use exponential backoff when waiting for a service to start. --- dlls/advapi32/service.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/advapi32/service.c b/dlls/advapi32/service.c index 60c99be6cd5..726fb365c6d 100644 --- a/dlls/advapi32/service.c +++ b/dlls/advapi32/service.c @@ -1620,7 +1620,7 @@ static BOOL service_wait_for_startup(SC_HANDLE hService) TRACE("%p\n", hService); - for (i=0; i<30; i++) + for (i=0; i<20; i++) { status.dwCurrentState = 0; r = QueryServiceStatus(hService, &status); @@ -1632,7 +1632,7 @@ static BOOL service_wait_for_startup(SC_HANDLE hService) break; } r = FALSE; - Sleep(1000); + Sleep(100 * i); } return r; }