summaryrefslogtreecommitdiff
path: root/lib/chef/http.rb
diff options
context:
space:
mode:
authordanielsdeleo <dan@getchef.com>2015-03-27 17:51:36 -0700
committerdanielsdeleo <dan@getchef.com>2015-04-01 13:35:01 -0700
commit8b42ac0374fb075fbcb21df73742e81e69d9bf6f (patch)
tree89866faf81354bab896ea964751b46b81458540e /lib/chef/http.rb
parent5581644c881e34f16d3f82d40636e88bb6a2ea97 (diff)
downloadchef-8b42ac0374fb075fbcb21df73742e81e69d9bf6f.tar.gz
Extract Chef Zero code out to chef zero, re-enable socket listening
Diffstat (limited to 'lib/chef/http.rb')
-rw-r--r--lib/chef/http.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/http.rb b/lib/chef/http.rb
index 0e0bc2988e..bfdc2b5e42 100644
--- a/lib/chef/http.rb
+++ b/lib/chef/http.rb
@@ -296,7 +296,7 @@ class Chef
http_attempts += 1
response, request, return_value = yield
# handle HTTP 50X Error
- if response.kind_of?(Net::HTTPServerError)
+ if response.kind_of?(Net::HTTPServerError) && !Chef::Config.local_mode
if http_retry_count - http_attempts + 1 > 0
sleep_time = 1 + (2 ** http_attempts) + rand(2 ** http_attempts)
Chef::Log.error("Server returned error #{response.code} for #{url}, retrying #{http_attempts}/#{http_retry_count} in #{sleep_time}s")