From 6c51942b032df33b069f453d29160cb222c4cc70 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Sat, 16 Jan 2016 19:01:06 -0800 Subject: [PATCH] start http profiling server by default --- lnd.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lnd.go b/lnd.go index 34233371..8561f381 100644 --- a/lnd.go +++ b/lnd.go @@ -21,6 +21,14 @@ var ( func main() { flag.Parse() + go func() { + listenAddr := net.JoinHostPort("", "5009") + profileRedirect := http.RedirectHandler("/debug/pprof", + http.StatusSeeOther) + http.Handle("/", profileRedirect) + fmt.Println(http.ListenAndServe(listenAddr, nil)) + }() + // Create, and start the lnwallet, which handles the core payment channel // logic, and exposes control via proxy state machines. // TODO(roasbeef): accept config via cli flags, move to real config file