Skip to content

Commit

Permalink
fix: don't add nil slices to recource manager
Browse files Browse the repository at this point in the history
  • Loading branch information
dennis-tra committed Jan 9, 2025
1 parent d5ee5f5 commit b7f6b02
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ant.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,8 @@ func SpawnAnt(ctx context.Context, ps peerstore.Peerstore, ds ds.Batching, cfg *
}

// Configure the resource manager to not limit anything
var (
noSubnetLimit []rcmgr.ConnLimitPerSubnet
noNetPrefixLimit []rcmgr.NetworkPrefixLimit
)
noSubnetLimit := []rcmgr.ConnLimitPerSubnet{}
noNetPrefixLimit := []rcmgr.NetworkPrefixLimit{}
limiter := rcmgr.NewFixedLimiter(rcmgr.InfiniteLimits)
rm, err := rcmgr.NewResourceManager(limiter,
rcmgr.WithLimitPerSubnet(noSubnetLimit, noSubnetLimit),
Expand Down

0 comments on commit b7f6b02

Please sign in to comment.