Skip to content

Commit

Permalink
task: validate retry_limit if is set (non false)
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Silva <[email protected]>
  • Loading branch information
edsiper committed Apr 5, 2017
1 parent edd403b commit cee904d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/flb_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ struct flb_task_retry *flb_task_retry_create(struct flb_task *task,
mk_list_foreach_safe(head, tmp, &task->retries) {
retry = mk_list_entry(head, struct flb_task_retry, _head);
if (retry->o_ins == o_ins) {
if (retry->attemps > o_ins->retry_limit) {
if (retry->attemps > o_ins->retry_limit && o_ins->retry_limit >= 0) {
flb_debug("[task] task_id=%i reached retry-attemps limit %i/%i",
task->id, retry->attemps, o_ins->retry_limit);
flb_task_retry_destroy(retry);
Expand Down

0 comments on commit cee904d

Please sign in to comment.