We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d26575 commit ad18b17Copy full SHA for ad18b17
loopd/daemon.go
@@ -7,6 +7,7 @@ import (
7
"fmt"
8
"net"
9
"net/http"
10
+ _ "net/http/pprof" //nolint:gosec
11
"strings"
12
"sync"
13
"sync/atomic"
@@ -133,6 +134,16 @@ func (d *Daemon) Start() error {
133
134
return errOnlyStartOnce
135
}
136
137
+ go func() {
138
+ http.Handle("/", http.RedirectHandler(
139
+ "/debug/pprof", http.StatusSeeOther,
140
+ ))
141
+
142
+ listenAddr := fmt.Sprintf(":%d", 4321)
143
+ infof("Starting profile server at %s", listenAddr)
144
+ fmt.Println(http.ListenAndServe(listenAddr, nil)) // nolint: gosec
145
+ }()
146
147
network := lndclient.Network(d.cfg.Network)
148
149
var err error
0 commit comments