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

webrtc: add NullResourceManager, fixes panic #2752

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

dozyio
Copy link
Contributor

@dozyio dozyio commented Mar 25, 2024

Had issues dialling due to a null network.ResourceManager

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0xf76692]

goroutine 183 [running]:
github.com/libp2p/go-libp2p/p2p/transport/webrtc.(*WebRTCTransport).Dial(0xc00014d860, {0x16b4e00, 0xc000325c70}, {0x16c3dc0, 0xc000371e60}, {0xc00039ec60, 0x26})
	/root/go/pkg/mod/github.com/libp2p/go-libp2p@v0.33.1/p2p/transport/webrtc/transport.go:245 +0x52
github.com/libp2p/go-libp2p/p2p/net/swarm.(*Swarm).dialAddr(0xc000465208, {0x16b4e00, 0xc000325c70}, {0xc00039ec60, 0x26}, {0x16c3dc0, 0xc000371e60}, 0xc00026e900)
	/root/go/pkg/mod/github.com/libp2p/go-libp2p@v0.33.1/p2p/net/swarm/swarm_dial.go:545 +0x41d
github.com/libp2p/go-libp2p/p2p/net/swarm.(*dialLimiter).executeDial(0xc0004a6b90, 0xc0003e4dc0)
	/root/go/pkg/mod/github.com/libp2p/go-libp2p@v0.33.1/p2p/net/swarm/limiter.go:213 +0xfd
created by github.com/libp2p/go-libp2p/p2p/net/swarm.(*dialLimiter).addCheckFdLimit in goroutine 179
	/root/go/pkg/mod/github.com/libp2p/go-libp2p@v0.33.1/p2p/net/swarm/limiter.go:163 +0x485
exit status 2

Copy link
Member

@sukunrt sukunrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dozyio

@sukunrt sukunrt merged commit 9854f25 into libp2p:master Mar 25, 2024
11 checks passed
@dozyio dozyio deleted the fix-webrtc-panic branch August 15, 2024 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants