Skip to content

Commit dd5a3a3

Browse files
committed
fix RetryNode loop that should be an infinity loop if max_attempts_ == -1
As documentation said: "Use -1 to create an infinite loop."
1 parent 0ab3895 commit dd5a3a3

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)