Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ee83da1

Browse files
Merge pull request BehaviorTree#145 from renan028/fix_retry_node_negative_tries
fix RetryNode loop that should be an infinity loop if max_attempts_ =…
2 parents 9e902e7 + dd5a3a3 commit ee83da1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/decorators/retry_node.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ NodeStatus RetryNode::tick()
5252

5353
setStatus(NodeStatus::RUNNING);
5454

55-
while (try_index_ < max_attempts_)
55+
while (try_index_ < max_attempts_ || max_attempts_ == -1)
5656
{
5757
NodeStatus child_state = child_node_->executeTick();
5858

0 commit comments

Comments
 (0)