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(events): avoid potential hang when starting event listener #5159

Merged
merged 1 commit into from
Dec 9, 2020

Commits on Dec 9, 2020

  1. fix: avoid potential hang when starting event listener

    It was possible for NewEvents to never return, blocked on waiting for a WaitGroup to be done.
    The call to Done was in a goroutine that could exit before reaching the Done call.
    
    Replace the WaitGroup with a channel that is closed to signal that initialisation is complete.
    Also, while we are waiting on the channel, wait on the context so we can exit clealy if the
    context is canceled.
    iand committed Dec 9, 2020
    Configuration menu
    Copy the full SHA
    696469a View commit details
    Browse the repository at this point in the history