Skip to content

Commit

Permalink
log absent limit file
Browse files Browse the repository at this point in the history
  • Loading branch information
schomatis authored and marten-seemann committed Mar 11, 2022
1 parent 46d4219 commit 5a98324
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/node/libp2p/rcmgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import (
"context"
"errors"
"fmt"
"os"
"github.com/ipfs/go-ipfs/repo"
"github.com/libp2p/go-libp2p"
"github.com/libp2p/go-libp2p-core/network"
rcmgr "github.com/libp2p/go-libp2p-resource-manager"
"go.uber.org/fx"
"os"
)

const NetLimitDefaultFilename = "limit.json"
Expand All @@ -21,6 +21,7 @@ func ResourceManager() func(fx.Lifecycle, repo.Repo) (network.ResourceManager, L

limitFile, err := os.Open(NetLimitDefaultFilename)
if errors.Is(err, os.ErrNotExist) {
log.Debug("limit file %s not found, creating a default resource manager", NetLimitDefaultFilename)
limiter = rcmgr.NewDefaultLimiter()
} else {
if err != nil {
Expand Down

0 comments on commit 5a98324

Please sign in to comment.