Browse Source

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
pull/3748/head
Anton Kaliaev 5 years ago
committed by GitHub
parent
commit
8fc8368438
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions
  1. +1
    -0
      CHANGELOG_PENDING.md
  2. +3
    -1
      node/node.go

+ 1
- 0
CHANGELOG_PENDING.md 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

+ 3
- 1
node/node.go 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{


Loading…
Cancel
Save