Skip to content

Commit

Permalink
return early from killPort() if strconv.Atoi() fails
Browse files Browse the repository at this point in the history
  • Loading branch information
bfgray3 committed May 9, 2023
1 parent 3d57737 commit 193fa8e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ func killPort(pid string) {
pidInt, err := strconv.Atoi(pid)
if err != nil {
log.Error("Could not convert to process pid to int")
return
}
err = syscall.Kill(pidInt, syscall.SIGKILL)
if err != nil {
Expand Down

0 comments on commit 193fa8e

Please sign in to comment.