summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2016-06-29 10:49:07 +0200
committerMarin Jankovski <maxlazio@gmail.com>2016-06-29 10:49:07 +0200
commit081b70adfee1c49b99b371ab80b6adbe84479f8b (patch)
tree06d6de41556c48e24ee735d715b16e2b1c6e9190
parentf1f9d58f821d9b45125d53624cf110d3291ab5be (diff)
downloadchef-081b70adfee1c49b99b371ab80b6adbe84479f8b.tar.gz
Remove deprecated Thread.exclusive around require call.
-rw-r--r--lib/chef/http.rb10
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)