Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[p2p] Try to fix P2P memory issue #3795

Merged
merged 3 commits into from
Jun 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ require (
github.com/hashicorp/golang-lru v0.5.4
github.com/ipfs/go-ds-badger v0.2.4
github.com/json-iterator/go v1.1.10
github.com/libp2p/go-libp2p v0.14.0
github.com/libp2p/go-libp2p v0.14.2
github.com/libp2p/go-libp2p-core v0.8.5
github.com/libp2p/go-libp2p-crypto v0.1.0
github.com/libp2p/go-libp2p-discovery v0.5.0
github.com/libp2p/go-libp2p-kad-dht v0.11.1
github.com/libp2p/go-libp2p-pubsub v0.4.0
github.com/libp2p/go-libp2p-kad-dht v0.12.1
github.com/libp2p/go-libp2p-pubsub v0.4.1
github.com/multiformats/go-multiaddr v0.3.1
github.com/multiformats/go-multiaddr-dns v0.3.1
github.com/natefinch/lumberjack v2.0.0+incompatible
Expand Down
3 changes: 2 additions & 1 deletion p2p/types/peerAddr.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ func resolveMultiAddrString(addrStr string) ([]libp2p_peer.AddrInfo, error) {

func resolveMultiAddr(raw ma.Multiaddr) ([]ma.Multiaddr, error) {
if madns.Matches(raw) {
ctx, _ := context.WithTimeout(context.Background(), 10*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
mas, err := madns.Resolve(ctx, raw)
if err != nil {
return nil, err
Expand Down