go-libp2p icon indicating copy to clipboard operation
go-libp2p copied to clipboard

Issue panic when user interrupt signal

Open ja7ad opened this issue 1 year ago • 3 comments

When close with ctrl+c or user interrupt signal this panic happen on close channel.

panic: close of closed channel [recovered]
	panic: closure error: unexpected panic caught: close of closed channel
	
	Closure added at:
		runtime.main at runtime/proc.go:272
		runtime.goexit at runtime/asm_amd64.s:1700

goroutine 1 [running]:
	runtime/panic.go:785 +0x132
github.com/libp2p/go-libp2p/p2p/host/eventbus.(*sub).Close(0xc00027ef50)
	github.com/libp2p/[email protected]/p2p/host/eventbus/basic.go:189 +0x225
...
Version Information
v0.36.5

ja7ad avatar Oct 09 '24 13:10 ja7ad