Prevent busy loop while waiting for WinRM connection

Set first run variable outside conditional so it will properly be
updated during the first run and pause on subsequent runs.
This commit is contained in:
Chris Roberts 2019-10-09 17:55:16 -07:00
parent 046f94c996
commit 8bb7d8dc16
1 changed files with 1 additions and 1 deletions

View File

@ -95,8 +95,8 @@ func (s *StepConnectWinRM) waitForWinRM(state multistep.StateBag, ctx context.Co
return nil, errors.New("WinRM wait cancelled")
case <-time.After(5 * time.Second):
}
first = false
}
first = false
host, err := s.Host(state)
if err != nil {