Skip to content

Commit

Permalink
Merge #5
Browse files Browse the repository at this point in the history
5: Replace errgroup#wait with errgroup#RoutinesCtx r=bhupeshbhatia a=bhupeshbhatia



Co-authored-by: bhupeshbhatia <bhatiabh@sheridancollege.ca>
  • Loading branch information
ninja-bruh and bhupeshbhatia committed Nov 1, 2018
2 parents 63f3f46 + b60b266 commit 6fca6c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ func main() {

for {
select {
case err := <-eventPoll.Wait():
err = errors.Wrap(err, "A critical error occurred")
case <-eventPoll.RoutinesCtx().Done():
err = errors.New("service-context closed")
log.Fatalln(err)

case eventResp := <-eventPoll.Delete():
Expand Down

0 comments on commit 6fca6c0

Please sign in to comment.