Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add context done case to waitForEvent
If the context is done before all the tasks are read from the queue, the remaining tasks on the queue will not be read and so the done channel will not be closed causing the goroutine to wait forever. This is solved by adding a context.Done() check so that when the context is closed we can carry on with shutting down of the iteration.
- Loading branch information