Skip to content

Commit

Permalink
nil check
Browse files Browse the repository at this point in the history
  • Loading branch information
anpep committed Sep 11, 2024
1 parent 5c691f4 commit bfd4775
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internals/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -687,8 +687,10 @@ func (d *Daemon) doReboot(sigCh chan<- os.Signal, waitTimeout time.Duration) err
return err
}

if err := d.rebootCleanup(); err != nil {
return err
if d.rebootCleanup != nil {
if err := d.rebootCleanup(); err != nil {
return err
}
}

// ask for shutdown and wait for it to happen.
Expand Down

0 comments on commit bfd4775

Please sign in to comment.