Skip to content

Commit

Permalink
Move Rescue block to fix unit test failure (#188)
Browse files Browse the repository at this point in the history
Signed-off-by: Shivani Shukla <[email protected]>
  • Loading branch information
sshivanii authored Jan 26, 2022
1 parent de0c732 commit 38e062b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/logstash/outputs/amazon_es/http_client/pool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,13 @@ def healthcheck!
set_new_major_version(major)
end
meta[:state] = :alive
rescue HostUnreachableError, BadResponseCodeError => e
logger.warn("Attempted to resurrect connection to dead ES instance, but got an error.", url: url.sanitized.to_s, error_type: e.class, error: e.message)
end
elsif skip_healthcheck == true
set_new_major_version(7)
meta[:state] = :alive
end
rescue HostUnreachableError, BadResponseCodeError => e
logger.warn("Attempted to resurrect connection to dead ES instance, but got an error.", url: url.sanitized.to_s, error_type: e.class, error: e.message)
end
end
end
Expand Down

0 comments on commit 38e062b

Please sign in to comment.