mirror of https://github.com/jetkvm/kvm.git
chore: reduce reboot delay to 3 seconds
This commit is contained in:
parent
b8af39cae9
commit
892e5f4195
|
|
@ -282,7 +282,10 @@ func (s *State) doUpdate(ctx context.Context, params UpdateParams) error {
|
|||
RedirectTo: redirectUrl,
|
||||
}
|
||||
|
||||
if err := s.reboot(true, postRebootAction, 10*time.Second); err != nil {
|
||||
// REBOOT_REDIRECT_DELAY_MS is 5 seconds in the UI,
|
||||
// it means that healthCheckUrl will be called after 5 seconds that we send willReboot JSONRPC event
|
||||
// so we need to reboot it within 5 seconds to avoid it being called before the device is rebooted
|
||||
if err := s.reboot(true, postRebootAction, 3*time.Second); err != nil {
|
||||
return s.componentUpdateError("Error requesting reboot", err, &scopedLogger)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue