diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-04-24 13:54:24 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-04-24 13:54:24 -0700 |
commit | 47b9da0494e48a3695295b69435e0a346056a187 (patch) | |
tree | e0824e17e54b31a91be3fb77ec81185085cc3d69 /lib/chef | |
parent | 75d61cbf8faacd1e303f50cf136ea1cbb1ac7de4 (diff) | |
download | chef-47b9da0494e48a3695295b69435e0a346056a187.tar.gz |
Remove the pointless helper method
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef')
-rw-r--r-- | lib/chef/provider/service/windows.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/chef/provider/service/windows.rb b/lib/chef/provider/service/windows.rb index 9a7f5fa1d8..6c1f7c3583 100644 --- a/lib/chef/provider/service/windows.rb +++ b/lib/chef/provider/service/windows.rb @@ -327,22 +327,18 @@ class Chef::Provider::Service::Windows < Chef::Provider::Service retries = 0 loop do break if current_state == desired_state - raise Timeout::Error if ( retries += 1 ) > resource_timeout + raise Timeout::Error if ( retries += 1 ) > @new_resource.timeout sleep 1 end end - def resource_timeout - @resource_timeout ||= @new_resource.timeout - end - def spawn_command_thread worker = Thread.new do yield end - Timeout.timeout(resource_timeout) do + Timeout.timeout(@new_resource.timeout) do worker.join end end |