```
defer close(stopUnlock)

if result.CurrentOperation != updateengine.UpdateStatusUpdatedNeedReboot {
    // Wait for a reboot needed signal
    <-ch
}

return r.reboot()
```