mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Call SetBlockProfileRate even it the profiling port is not set
Signed-off-by: Jean-Noël Moyne <jnmoyne@gmail.com>
This commit is contained in:
@@ -2093,6 +2093,9 @@ func (s *Server) Start() {
|
||||
// Pprof http endpoint for the profiler.
|
||||
if opts.ProfPort != 0 {
|
||||
s.StartProfiler()
|
||||
} else {
|
||||
// Enable blocking profile even if no port defined since profiling is always possible over $SYS requests
|
||||
runtime.SetBlockProfileRate(1)
|
||||
}
|
||||
|
||||
if opts.ConfigFile != _EMPTY_ {
|
||||
|
||||
Reference in New Issue
Block a user