Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions tail.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,8 @@ func (tail *Tail) tailFileSync() {
// file when rate limit is reached.
msg := ("Too much log activity; waiting a second " +
"before resuming tailing")
tail.Lines <- &Line{msg, time.Now(), errors.New(msg)}
select {
case tail.Lines <- &Line{msg, time.Now(), errors.New(msg)}:
case <-time.After(time.Second):
case <-tail.Dying():
return
Expand Down Expand Up @@ -414,7 +414,11 @@ func (tail *Tail) sendLine(line string) bool {
}

for _, line := range lines {
tail.Lines <- &Line{line, now, nil}
select {
case tail.Lines <- &Line{line, now, nil}:
case <-tail.Dying():
return false
}
}

if tail.Config.RateLimiter != nil {
Expand Down