lib/rspec-system/node_set/base.rb in rspec-system-2.7.1 vs lib/rspec-system/node_set/base.rb in rspec-system-2.7.2
- old
+ new
@@ -214,10 +214,10 @@
begin
timeout(ssh_timeout) do
output << bold(color("localhost$", :green)) << " ssh -l #{opts[:user]} #{opts[:host]}\n"
Net::SSH.start(opts[:host], opts[:user], opts[:net_ssh_options])
end
- rescue Timeout::Error, SystemCallError => e
+ rescue Timeout::Error, SystemCallError, Net::SSH::Exception, SocketError => e
tries += 1
output << e.message << "\n"
if tries < ssh_tries
log.info("Sleeping for #{ssh_sleep} seconds then trying again ...")
sleep ssh_sleep