Merge pull request #8470 from filecoin-project/feat/enable-rcmgr-by-default

enable rcmgr by default
This commit is contained in:
Jiaying Wang 2022-04-12 16:12:03 +02:00 committed by GitHub
commit ce3c6472fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,8 +28,8 @@ import (
func ResourceManager(connMgrHi uint) func(lc fx.Lifecycle, repo repo.LockedRepo) (network.ResourceManager, error) { func ResourceManager(connMgrHi uint) func(lc fx.Lifecycle, repo repo.LockedRepo) (network.ResourceManager, error) {
return func(lc fx.Lifecycle, repo repo.LockedRepo) (network.ResourceManager, error) { return func(lc fx.Lifecycle, repo repo.LockedRepo) (network.ResourceManager, error) {
envvar := os.Getenv("LOTUS_RCMGR") envvar := os.Getenv("LOTUS_RCMGR")
if envvar == "" || envvar == "0" { if envvar == "0" {
// TODO opt-in for now -- flip this to enabled by default once we are comfortable with testing // this is enabled by default; specify LOTUS_RCMGR=0 to disable
log.Info("libp2p resource manager is disabled") log.Info("libp2p resource manager is disabled")
return network.NullResourceManager, nil return network.NullResourceManager, nil
} }