Skip to content

Commit

Permalink
Merge pull request #5 from libp2p/fix/bug-log
Browse files Browse the repository at this point in the history
downgrade BUG log to warning
  • Loading branch information
vyzo authored Jan 18, 2022
2 parents 1bc2ef3 + 6f70ba3 commit 39e3bd3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions p2p/host/resource-manager/scope.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (rc *resources) releaseMemory(size int64) {

// sanity check for bugs upstream
if rc.memory < 0 {
log.Error("BUG: too much memory released")
log.Warn("BUG: too much memory released")
rc.memory = 0
}
}
Expand Down Expand Up @@ -137,11 +137,11 @@ func (rc *resources) removeStreams(incount, outcount int) {
rc.nstreamsOut -= outcount

if rc.nstreamsIn < 0 {
log.Error("BUG: too many inbound streams released")
log.Warn("BUG: too many inbound streams released")
rc.nstreamsIn = 0
}
if rc.nstreamsOut < 0 {
log.Error("BUG: too many outbound streams released")
log.Warn("BUG: too many outbound streams released")
rc.nstreamsOut = 0
}
}
Expand Down Expand Up @@ -198,15 +198,15 @@ func (rc *resources) removeConns(incount, outcount, fdcount int) {
rc.nfd -= fdcount

if rc.nconnsIn < 0 {
log.Error("BUG: too many inbound connections released")
log.Warn("BUG: too many inbound connections released")
rc.nconnsIn = 0
}
if rc.nconnsOut < 0 {
log.Error("BUG: too many outbound connections released")
log.Warn("BUG: too many outbound connections released")
rc.nconnsOut = 0
}
if rc.nfd < 0 {
log.Error("BUG: too many file descriptors released")
log.Warn("BUG: too many file descriptors released")
rc.nfd = 0
}
}
Expand Down

0 comments on commit 39e3bd3

Please sign in to comment.