Permalink
Browse files

Retry n SSL error

  • Loading branch information...
1 parent c5f9564 commit 90c3a9b2a3349c3031ed9a3920c1b16f5a0bca60 @mdaines-r7 mdaines-r7 committed Nov 16, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/nexpose/api_request.rb
@@ -81,6 +81,11 @@ def execute
# drops our HTTP connection before processing. We try 5 times to establish a
# connection in these situations. The actual exception occurs in the Ruby
# http library, which is why we use such generic error classes.
+ rescue OpenSSL::SSL::SSLError
+ if @conn_tries < 5
+ @conn_tries += 1
+ retry
+ end
rescue ::ArgumentError, ::NoMethodError
if @conn_tries < 5
@conn_tries += 1

0 comments on commit 90c3a9b

Please sign in to comment.