StepConfigureVNC: close listener only once

This commit is contained in:
Adrien Delorme 2019-03-26 10:58:51 +01:00
parent 91cc7e1091
commit ac92916b01
1 changed files with 1 additions and 2 deletions

View File

@ -48,7 +48,7 @@ func (s *StepConfigureVNC) VNCAddress(ctx context.Context, vncBindAddress string
return "", 0, err
}
s.l.Listener.Close()
s.l.Listener.Close() // free port, but don't unlock lock file
return s.l.Address, s.l.Port, nil
}
@ -103,7 +103,6 @@ func (s *StepConfigureVNC) Run(ctx context.Context, state multistep.StateBag) mu
ui.Error(err.Error())
return multistep.ActionHalt
}
s.l.Listener.Close() // free port, but don't unlock lock file
vncPassword := VNCPassword(s.VNCDisablePassword)