Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Commit

Permalink
use the resource manager
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Jan 18, 2022
1 parent 28fb8d2 commit 592ef22
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 46 deletions.
3 changes: 2 additions & 1 deletion dial.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ func (d *RelayTransport) Dial(ctx context.Context, a ma.Multiaddr, p peer.ID) (t
return nil, err
}
c.tagHop()
return d.upgrader.Upgrade(ctx, d, c, network.DirOutbound, p)
scope, _ := network.NullResourceManager.OpenConnection(network.DirOutbound, false)
return d.upgrader.Upgrade(ctx, d, c, network.DirOutbound, p, scope)
}

func (r *Relay) Dial(ctx context.Context, a ma.Multiaddr, p peer.ID) (*Conn, error) {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ require (
github.com/ipfs/go-log v1.0.5
github.com/libp2p/go-buffer-pool v0.0.2
github.com/libp2p/go-libp2p-blankhost v0.2.0
github.com/libp2p/go-libp2p-core v0.13.1-0.20220104083644-a3dd401efe36
github.com/libp2p/go-libp2p-swarm v0.9.1-0.20220104091227-f776b7e504b1
github.com/libp2p/go-libp2p-core v0.14.0
github.com/libp2p/go-libp2p-swarm v0.10.0
github.com/libp2p/go-msgio v0.0.6
github.com/multiformats/go-multiaddr v0.5.0
github.com/multiformats/go-varint v0.0.6
Expand Down
Loading

0 comments on commit 592ef22

Please sign in to comment.