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

@ -40,3 +40,4 @@
- [libs/db] \#3717 Fixed the BoltDB backend's Batch.Delete implementation (@Yawning)
- [libs/db] \#3718 Fixed the BoltDB backend's Get and Iterator implementation (@Yawning)
- [node] \#3716 Fix a bug where `nil` is recorded as node's address
- [node] \#3741 Fix profiler blocking the entire node

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{