Disable pprof

This commit is contained in:
Ben Sarmiento
2023-12-03 12:56:12 +01:00
parent 2a4276aa3e
commit e6ec369767
2 changed files with 9 additions and 9 deletions

View File

@@ -5,7 +5,7 @@ import (
netHttp "net/http"
"os"
_ "net/http/pprof" // Register pprof
// _ "net/http/pprof" // Register pprof
"github.com/debridmediamanager/zurg/internal/config"
"github.com/debridmediamanager/zurg/internal/router"
@@ -65,12 +65,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)