Implement review suggestions

This commit is contained in:
Daniel
2020-08-11 16:16:01 +02:00
parent 092da058a5
commit ae5e7eb767
3 changed files with 54 additions and 41 deletions

View File

@@ -43,8 +43,6 @@ func shutdown(ctx context.Context, _ interface{}) error {
// restart restarts the Portmaster.
func restart(ctx context.Context, data interface{}) error {
log.Info("core: user requested restart")
modules.SetExitStatusCode(updates.RestartExitCode)
// Do not use a worker, as this would block itself here.
go modules.Shutdown() //nolint:errcheck
updates.RestartNow()
return nil
}