summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-06-29 10:23:41 -0700
committerGitHub <noreply@github.com>2016-06-29 10:23:41 -0700
commit8bfb1be5af68b5837efe692ce2c60849fc758a41 (patch)
tree06d6de41556c48e24ee735d715b16e2b1c6e9190
parentf1f9d58f821d9b45125d53624cf110d3291ab5be (diff)
parent081b70adfee1c49b99b371ab80b6adbe84479f8b (diff)
downloadchef-8bfb1be5af68b5837efe692ce2c60849fc758a41.tar.gz
Merge pull request #5068 from maxlazio/remove_deprecated_thread_exclusive
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)