node: run whole func in goroutine, not just logger.Error fn (#3743)

* node: run whole func in goroutine, not just logger.Error fn

Fixes #3741

* add a changelog entry
This commit is contained in:
Anton Kaliaev
2019-06-22 10:30:23 +04:00
committed by GitHub
parent 228bba799d
commit 8fc8368438
2 changed files with 4 additions and 1 deletions

View File

@ -630,7 +630,9 @@ func NewNode(config *cfg.Config,
}
if config.ProfListenAddress != "" {
go logger.Error("Profile server", "err", http.ListenAndServe(config.ProfListenAddress, nil))
go func() {
logger.Error("Profile server", "err", http.ListenAndServe(config.ProfListenAddress, nil))
}()
}
node := &Node{