Skip to content

Commit

Permalink
remove panic() when cmd or process is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
mostlygeek committed Feb 7, 2025
1 parent 09bdd86 commit eab9795
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion proxy/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,8 @@ func (p *Process) stopCommand(sigtermTTL time.Duration) {
}()

if p.cmd == nil || p.cmd.Process == nil {
panic("this should not happen, cmd or cmd.Process is nil")
fmt.Fprintf(p.logMonitor, "!!! process [%s] cmd or cmd.Process is nil", p.ID)
return
}

p.cmd.Process.Signal(syscall.SIGTERM)
Expand Down

0 comments on commit eab9795

Please sign in to comment.