Skip to content

Commit

Permalink
Raise Errno::ETIMEDOUT as "acceptable" Errors::ConnectionTimeout
Browse files Browse the repository at this point in the history
  • Loading branch information
bheuvel committed Jul 15, 2015
1 parent 2209d76 commit f12f50c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/communicators/winrm/shell.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ def raise_winrm_exception(exception, shell = nil, command = nil)
raise Errors::SSLError, message: exception.message
when HTTPClient::TimeoutError
raise Errors::ConnectionTimeout, message: exception.message
when Errno::ETIMEDOUT
raise Errors::ConnectionTimeout
# This is raised if the connection timed out
when Errno::ECONNREFUSED
# This is raised if we failed to connect the max amount of times
raise Errors::ConnectionRefused
Expand Down

0 comments on commit f12f50c

Please sign in to comment.