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

Commit d74dc57

Browse files
Merge pull request #148 from libp2p/rcmgr
use the resource manager
2 parents 28fb8d2 + 592ef22 commit d74dc57

File tree

3 files changed

+49
-46
lines changed

3 files changed

+49
-46
lines changed

dial.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ func (d *RelayTransport) Dial(ctx context.Context, a ma.Multiaddr, p peer.ID) (t
1717
return nil, err
1818
}
1919
c.tagHop()
20-
return d.upgrader.Upgrade(ctx, d, c, network.DirOutbound, p)
20+
scope, _ := network.NullResourceManager.OpenConnection(network.DirOutbound, false)
21+
return d.upgrader.Upgrade(ctx, d, c, network.DirOutbound, p, scope)
2122
}
2223

2324
func (r *Relay) Dial(ctx context.Context, a ma.Multiaddr, p peer.ID) (*Conn, error) {

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ require (
77
github.com/ipfs/go-log v1.0.5
88
github.com/libp2p/go-buffer-pool v0.0.2
99
github.com/libp2p/go-libp2p-blankhost v0.2.0
10-
github.com/libp2p/go-libp2p-core v0.13.1-0.20220104083644-a3dd401efe36
11-
github.com/libp2p/go-libp2p-swarm v0.9.1-0.20220104091227-f776b7e504b1
10+
github.com/libp2p/go-libp2p-core v0.14.0
11+
github.com/libp2p/go-libp2p-swarm v0.10.0
1212
github.com/libp2p/go-msgio v0.0.6
1313
github.com/multiformats/go-multiaddr v0.5.0
1414
github.com/multiformats/go-varint v0.0.6

0 commit comments

Comments
 (0)