Skip to content

Commit

Permalink
Do not run watchParentProcess for daemon mode (#135)
Browse files Browse the repository at this point in the history
If we run with custom config, then we run as daemon, thus no need to watch for parent process.
  • Loading branch information
antonsoroko authored Jul 18, 2024
1 parent ac9b7bd commit e5330ff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,10 @@ func main() {
time.Sleep(1 * time.Second)
}
}
go watchParentProcess()
// If we run with custom config, then we run as daemon, thus no need to watch for parent process
if config.Args.ConfigPath == "" {
go watchParentProcess()
}

// Make sure HTTP mux is empty
http.DefaultServeMux = new(http.ServeMux)
Expand Down

0 comments on commit e5330ff

Please sign in to comment.