fix(libp2p): streams config validation in resource manager (#10435)
Lukáš Lukáč committed
Jun 3, 2024 at 21:13 UTC
40cf630874a3fc0c6ad9e1dc3045f67319dae402
1 file changed
+1
-1
core/node/libp2p/rcmgr.go
+1
-1
@@ -491,7 +491,7 @@ resource manager System.ConnsInbound (%d) must be bigger than ConnMgr.HighWater
491
See: https://github.com/ipfs/kubo/blob/master/docs/libp2p-resource-management.md#how-does-the-resource-manager-resourcemgr-relate-to-the-connection-manager-connmgr
492
`, rcm.System.ConnsInbound, highWater)
493
}
494
- if rcm.System.Streams > rcmgr.DefaultLimit || rcm.System.Streams == rcmgr.BlockAllLimit && int64(rcm.System.Streams) <= highWater {
494
+ if (rcm.System.Streams > rcmgr.DefaultLimit || rcm.System.Streams == rcmgr.BlockAllLimit) && int64(rcm.System.Streams) <= highWater {
495
// nolint
496
return fmt.Errorf(`
497
Unable to initialize libp2p due to conflicting resource manager limit configuration.