summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/chef/http.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/chef/http.rb b/lib/chef/http.rb
index 16a826a3db..66f8e49680 100644
--- a/lib/chef/http.rb
+++ b/lib/chef/http.rb
@@ -329,6 +329,13 @@ class Chef
retry
end
raise Timeout::Error, "Timeout connecting to #{url}, giving up"
+ rescue OpenSSL::SSL::SSLError
+ if http_retry_count - http_attempts + 1 > 0
+ Chef::Log.error("SSL Error connecting to #{url}, retry #{http_attempts}/#{http_retry_count}")
+ sleep(http_retry_delay)
+ retry
+ end
+ raise Timeout::Error, "SSL Error connecting to #{url}, giving up"
end
end