ZeroMemory(&service->throttle_duetime, sizeof(service->throttle_duetime));\r
SetWaitableTimer(service->throttle_timer, &service->throttle_duetime, 0, 0, 0, 0);\r
}\r
- service->status.dwCurrentState = SERVICE_CONTINUE_PENDING;\r
+ /* We can't continue if the application is running! */\r
+ if (! service->process_handle) service->status.dwCurrentState = SERVICE_CONTINUE_PENDING;\r
service->status.dwWaitHint = throttle_milliseconds(service->throttle) + NSSM_WAITHINT_MARGIN;\r
log_event(EVENTLOG_INFORMATION_TYPE, NSSM_EVENT_RESET_THROTTLE, service->name, 0);\r
SetServiceStatus(service->status_handle, &service->status);\r