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

fix(tea): allocate msgs channel in constructor #180

Merged
merged 1 commit into from Jan 14, 2022

Commits on Jan 4, 2022

  1. fix(tea): allocate msgs channel in constructor

    Race condition bug: Start() is called in a new gorotuine, then Send(). If the
    Send happens before the msgs channel is allocated, the message is dropped.
    
    Instead allocate the channel in the constructor, so msgs is never nil.
    
    Signed-off-by: Christian Stewart <christian@paral.in>
    paralin committed Jan 4, 2022
    Copy the full SHA
    6342ad9 View commit details
    Browse the repository at this point in the history