Skip to content

Commit

Permalink
prevent another nil pointer exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Marius Sturm committed Aug 17, 2016
1 parent 21d5fe1 commit c363bee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ func (r *Runner) Stop(s service.Service) error {
r.Running = false

// give the chance to cleanup resources
r.cmd.Process.Signal(syscall.SIGHUP)
if r.cmd.Process != nil {
r.cmd.Process.Signal(syscall.SIGHUP)
}
time.Sleep(2 * time.Second)

close(r.exit)
Expand Down

0 comments on commit c363bee

Please sign in to comment.