X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=service.cpp;h=1e78c3c9757a239a858958405317bf194d7b7fa6;hb=c50225935f0143fbe5fb37d906aa7e6e68f81040;hp=873b8a8f537b423a968a94cb38ad7eaf65246650;hpb=23b8173ce06a843f18a9269fc6f7d4d0d224cd4c;p=nssm.git diff --git a/service.cpp b/service.cpp index 873b8a8..1e78c3c 100644 --- a/service.cpp +++ b/service.cpp @@ -404,13 +404,13 @@ int start_service() { close_output_handles(&si); + /* Wait for a clean startup. */ + if (WaitForSingleObject(process_handle, throttle_delay) == WAIT_TIMEOUT) throttle = 0; + /* Signal successful start */ service_status.dwCurrentState = SERVICE_RUNNING; SetServiceStatus(service_handle, &service_status); - /* Wait for a clean startup. */ - if (WaitForSingleObject(process_handle, throttle_delay) == WAIT_TIMEOUT) throttle = 0; - return 0; }