OSDN Git Service

Merge pull request #1249 from Bytom/dev
authorPaladz <yzhu101@uottawa.ca>
Mon, 13 Aug 2018 10:15:23 +0000 (18:15 +0800)
committerGitHub <noreply@github.com>
Mon, 13 Aug 2018 10:15:23 +0000 (18:15 +0800)
Dev

node/node.go

index f439669..2c85351 100644 (file)
@@ -123,7 +123,9 @@ func NewNode(config *cfg.Config) *Node {
                // Profiling bytomd programs.see (https://blog.golang.org/profiling-go-programs)
                // go tool pprof http://profileHose/debug/pprof/heap
                go func() {
-                       http.ListenAndServe(profileHost, nil)
+                       if err = http.ListenAndServe(profileHost, nil); err != nil {
+                               cmn.Exit(cmn.Fmt("Failed to register tcp profileHost: %v", err))
+                       }
                }()
        }