[KARAF-2996] Improve shutdown sleep time management