Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions cmd/cdnsd/main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 Blink Labs Software
// Copyright 2025 Blink Labs Software
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
Expand All @@ -11,10 +11,12 @@ import (
"fmt"
"log/slog"
"net/http"
_ "net/http/pprof"
"os"
"time"

// #nosec G108
_ "net/http/pprof"

"github.com/prometheus/client_golang/prometheus/promhttp"
"go.uber.org/automaxprocs/maxprocs"

Expand Down Expand Up @@ -85,14 +87,15 @@ func main() {
),
)
go func() {
err := http.ListenAndServe(
fmt.Sprintf(
debugger := &http.Server{
Addr: fmt.Sprintf(
"%s:%d",
cfg.Debug.ListenAddress,
cfg.Debug.ListenPort,
),
nil,
)
ReadHeaderTimeout: 60 * time.Second,
}
err := debugger.ListenAndServe()
if err != nil {
slog.Error(
fmt.Sprintf("failed to start debug listener: %s", err),
Expand Down