Skip to content

Commit

Permalink
Merge 3eaf6f6 into f86938d
Browse files Browse the repository at this point in the history
  • Loading branch information
mstoykov committed Jul 13, 2023
2 parents f86938d + 3eaf6f6 commit 11f3af5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions log/loki.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,13 @@ func (h *lokiHook) Listen(ctx context.Context) {
pushCh = make(chan chan int64)
)

pushDone := make(chan struct{})
defer func() { <-pushDone }()
defer ticker.Stop()
defer close(pushCh)

go func() {
defer close(pushDone)
oldLogs := make([]tmpMsg, 0, h.limit*2)
for ch := range pushCh {
msgsToPush, msgs = msgs, msgsToPush
Expand Down

0 comments on commit 11f3af5

Please sign in to comment.