File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 1- // Copyright 2023 Blink Labs Software
1+ // Copyright 2025 Blink Labs Software
22//
33// Licensed under the Apache License, Version 2.0 (the "License");
44// you may not use this file except in compliance with the License.
@@ -18,8 +18,11 @@ import (
1818 "flag"
1919 "fmt"
2020 "net/http"
21- _ "net/http/pprof"
2221 "os"
22+ "time"
23+
24+ // #nosec G108
25+ _ "net/http/pprof"
2326
2427 "go.uber.org/automaxprocs/maxprocs"
2528
@@ -83,14 +86,15 @@ func main() {
8386 cfg .Debug .ListenPort ,
8487 )
8588 go func () {
86- err := http .ListenAndServe (
87- fmt .Sprintf (
89+ debugger := & http.Server {
90+ Addr : fmt .Sprintf (
8891 "%s:%d" ,
8992 cfg .Debug .ListenAddress ,
9093 cfg .Debug .ListenPort ,
9194 ),
92- nil ,
93- )
95+ ReadHeaderTimeout : 60 * time .Second ,
96+ }
97+ err := debugger .ListenAndServe ()
9498 if err != nil {
9599 logger .Fatalf ("failed to start debug listener: %s" , err )
96100 }
You can’t perform that action at this time.
0 commit comments