From dd5a3a38650c327519845233775ad08629b73b4e Mon Sep 17 00:00:00 2001 From: renan028 Date: Thu, 6 Feb 2020 21:59:49 -0300 Subject: [PATCH] fix RetryNode loop that should be an infinity loop if max_attempts_ == -1 As documentation said: "Use -1 to create an infinite loop." --- src/decorators/retry_node.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/decorators/retry_node.cpp b/src/decorators/retry_node.cpp index c8422ad11..d777c716e 100644 --- a/src/decorators/retry_node.cpp +++ b/src/decorators/retry_node.cpp @@ -52,7 +52,7 @@ NodeStatus RetryNode::tick() setStatus(NodeStatus::RUNNING); - while (try_index_ < max_attempts_) + while (try_index_ < max_attempts_ || max_attempts_ == -1) { NodeStatus child_state = child_node_->executeTick();