diff options
author | Marin Jankovski <maxlazio@gmail.com> | 2016-06-29 10:49:07 +0200 |
---|---|---|
committer | Marin Jankovski <maxlazio@gmail.com> | 2016-06-29 10:49:07 +0200 |
commit | 081b70adfee1c49b99b371ab80b6adbe84479f8b (patch) | |
tree | 06d6de41556c48e24ee735d715b16e2b1c6e9190 /lib | |
parent | f1f9d58f821d9b45125d53624cf110d3291ab5be (diff) | |
download | chef-081b70adfee1c49b99b371ab80b6adbe84479f8b.tar.gz |
Remove deprecated Thread.exclusive around require call.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/http.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/chef/http.rb b/lib/chef/http.rb index c6afa97d23..3e69f58383 100644 --- a/lib/chef/http.rb +++ b/lib/chef/http.rb @@ -232,11 +232,11 @@ class Chef # PERFORMANCE CRITICAL: *MUST* lazy require here otherwise we load up webrick # via chef-zero and that hits DNS (at *require* time) which may timeout, # when for most knife/chef-client work we never need/want this loaded. - Thread.exclusive { - unless defined?(SocketlessChefZeroClient) - require "chef/http/socketless_chef_zero_client" - end - } + + unless defined?(SocketlessChefZeroClient) + require "chef/http/socketless_chef_zero_client" + end + SocketlessChefZeroClient.new(base_url) else BasicClient.new(base_url, :ssl_policy => Chef::HTTP::APISSLPolicy) |