utils.go udpDataCh: panic: send on closed channel
Hi 👋,
I just encountered this error.
panic: send on closed channel
goroutine 405 [running]:
github.com/netsampler/goflow2/utils.UDPStoppableRoutine.func1()
go/pkg/mod/github.com/netsampler/[email protected]/utils/utils.go:171 +0x9a
created by github.com/netsampler/goflow2/utils.UDPStoppableRoutine
go/pkg/mod/github.com/netsampler/[email protected]/utils/utils.go:164 +0x952
It seems that udpDataCh might be closed here https://github.com/netsampler/goflow2/blob/main/utils/utils.go#L184
But data will still be pushed to it from here https://github.com/netsampler/goflow2/blob/main/utils/utils.go#L171
Hello, Thank you for the report. Could you give more information? How did it trigger? I believe it appears also during some testing. It's not the first time since #40 :/ Are you able to PR?
Thank you for the report. Could you give more information? How did it trigger?
It triggered after sending a very high volume of NetFlow traffic to goflow2 and then stopping the goflow listeners.
It was indeed during some testing with high volume of NetFlow data, but seems something that could happen in production case too.
Are you able to PR?
Yes, let me see what I can do.