Should honor max_tries.

Identified another place where ssh.max_tries was not being used where
  is likely should be.
This commit is contained in:
Cody Herriges 2011-09-29 15:35:07 -07:00
parent 48f3ce5880
commit f9c485bf05
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ module Vagrant
# the actual `exec!` implementation, except that this # the actual `exec!` implementation, except that this
# implementation also reports `:exit_status` to the block if given. # implementation also reports `:exit_status` to the block if given.
def exec!(commands, options=nil, &block) def exec!(commands, options=nil, &block)
retryable(:tries => 5, :on => [IOError, Net::SSH::Disconnect], :sleep => 1.0) do retryable(:tries => env.config.ssh.max_tries, :on => [IOError, Net::SSH::Disconnect], :sleep => 1.0) do
metach = session.open_channel do |ch| metach = session.open_channel do |ch|
ch.exec("#{env.config.ssh.shell} -l") do |ch2, success| ch.exec("#{env.config.ssh.shell} -l") do |ch2, success|
# Set the terminal # Set the terminal