Skip to content

Conversation

magodo
Copy link

@magodo magodo commented Aug 31, 2023

When the context of the Listen() being canceled. There is a race condition that the goroutine that closes the events channel runs prior than the other handler goroutines (for both message/messageerror). If this happens, those handler goroutines will panic as the events channel is closed, and sending to a closed channel just panics in Go.

magodo added 2 commits August 31, 2023 21:43
When the context of the `Listen()` being canceled. There is a race condition that the goroutine that closes the `events` channel runs prior than the other handler goroutines (for both `message`/`messageerror`). If this happens, those handler goroutines will panic as the `events` channel is closed, and sending to a closed channel just panics in Go.
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.

1 participant