From 9985bb7f0afc951513f774ddb4f04e09220d8505 Mon Sep 17 00:00:00 2001 From: Ben Sarmiento Date: Sat, 2 Dec 2023 20:04:57 +0100 Subject: [PATCH] Comment out pprof --- internal/app.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/internal/app.go b/internal/app.go index a1bcaf7..5b050ea 100644 --- a/internal/app.go +++ b/internal/app.go @@ -16,8 +16,7 @@ import ( "github.com/dgraph-io/ristretto" "github.com/julienschmidt/httprouter" "github.com/panjf2000/ants/v2" - - _ "net/http/pprof" // Register pprof + // _ "net/http/pprof" // Register pprof ) func MainApp(configPath string) { @@ -65,12 +64,12 @@ func MainApp(configPath string) { handler.RedirectFixedPath = true router.ApplyRouteTable(handler, getfile, torrentMgr, config, rd, log.Named("router")) - go func() { - if err := netHttp.ListenAndServe(":6060", nil); err != nil && err != netHttp.ErrServerClosed { - zurglog.Errorf("Failed to start pprof: %v", err) - os.Exit(1) - } - }() + // go func() { + // if err := netHttp.ListenAndServe(":6060", nil); err != nil && err != netHttp.ErrServerClosed { + // zurglog.Errorf("Failed to start pprof: %v", err) + // os.Exit(1) + // } + // }() addr := fmt.Sprintf("%s:%s", config.GetHost(), config.GetPort()) zurglog.Infof("Starting server on %s", addr)