You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am digging in the codebase and testing it, I have found a bug. Sending messages in separate gouroutines is not synchronized, meaning when a service is asked to shutdown and the main function finishes, all other goroutines will die immediately.
To solve this, I've implemented a simple wait group in my copy of your code:
Hey,
I am digging in the codebase and testing it, I have found a bug. Sending messages in separate gouroutines is not synchronized, meaning when a service is asked to shutdown and the main function finishes, all other goroutines will die immediately.
To solve this, I've implemented a simple wait group in my copy of your code:
Then in the main function, I call
Wait()
at the very end to ensure all sender goroutines are finished before the service gracefully shutdowns.Apologies I am not sending a patch, my copy of your codebase diverged quite a bit, my usecase is different. Cheers!
The text was updated successfully, but these errors were encountered: