Skip to content

Commit

Permalink
[retry_node] Refresh max_attempts_ in case it changed (#905)
Browse files Browse the repository at this point in the history
Co-authored-by: Guillaume Doisy <guillaume@dexory.com>
  • Loading branch information
doisyg and Guillaume Doisy authored Jan 10, 2025
1 parent 6c958bd commit 17a9c35
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/decorators/retry_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ NodeStatus RetryNode::tick()

case NodeStatus::FAILURE: {
try_count_++;
// Refresh max_attempts_ in case it changed in one of the child nodes
getInput(NUM_ATTEMPTS, max_attempts_);
do_loop = try_count_ < max_attempts_ || max_attempts_ == -1;

resetChild();
Expand Down

0 comments on commit 17a9c35

Please sign in to comment.