Skip to content

Commit

Permalink
Lower the retry count to 30
Browse files Browse the repository at this point in the history
  • Loading branch information
sychan committed May 7, 2018
1 parent 28ad938 commit aecc6fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tail.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func tailFile(ctx context.Context, file string, poll bool, dest *os.File) {
if t.Err() != nil {
log.Printf("Warning: unable to tail %s: %s", file, t.Err())
errCount++
if errCount > 100 {
if errCount > 30 {
log.Fatalf("Logged %d consecutive errors while tailing. Exiting", errCount)
}
time.Sleep(2 * time.Second) // Sleep for 2 seconds before retrying
Expand Down

0 comments on commit aecc6fc

Please sign in to comment.