Skip to content

Commit

Permalink
Close events channel after job completes (#10)
Browse files Browse the repository at this point in the history
In order to avoid that listeners are waiting for more events after the
job has completed we have to close the channel.
  • Loading branch information
mwuertinger authored Jun 4, 2019
1 parent 8f9bae6 commit ac60a1d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/job/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ end:
err = ctx.Err()
}

// close events channel to signal that we're done here
if events != nil {
close(events)
}

// send the result
resultChan <- result{success, err}
}
Expand Down

0 comments on commit ac60a1d

Please sign in to comment.