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

kubernetes registry: do not send to closed channel #113

Merged
merged 1 commit into from
Jun 5, 2023

Conversation

butonic
Copy link
Contributor

@butonic butonic commented Jun 2, 2023

Under heavy request load we encounter this panic:

panic: send on closed channel

goroutine 44488 [running]:
github.com/go-micro/plugins/v4/registry/kubernetes/client/watch.(*bodyWatcher).stream.func2()
    github.com/go-micro/plugins/v4/registry/[email protected]/client/watch/body.go:72 +0x1ab
created by github.com/go-micro/plugins/v4/registry/kubernetes/client/watch.(*bodyWatcher).stream
    github.com/go-micro/plugins/v4/registry/[email protected]/client/watch/body.go:51 +0x23b

With this PR we no longer see this panic.

AFAICT this is caused by closign the channel at the wrong time. Channels are rather unmapped territory for me, so let me know if this is the proper solution.

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