Skip to content

Commit

Permalink
fix business error / check maxretries from 1 not 0
Browse files Browse the repository at this point in the history
  • Loading branch information
skadefro committed Nov 27, 2022
1 parent c9884f8 commit 30adf91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions OpenFlow/src/Messages/Message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4932,11 +4932,11 @@ export class Message {
} else if (["failed", "successful", "retry", "processing"].indexOf(msg.state) == -1) {
throw new Error("Illegal state " + msg.state + " on Workitem, must be failed, successful, processing or retry");
}
if (msg.errortype == "business" && msg.state == "retry" && msg.ignoremaxretries == false) msg.state = "failed";
if (msg.errortype == "business" && msg.state == "retry" && msg.ignoremaxretries != true) msg.state = "failed";
// if (msg.errortype == "business" && msg.ignoremaxretries == false) msg.state = "failed";
if (msg.state == "retry") {
if (NoderedUtil.IsNullEmpty(wi.retries)) wi.retries = 0;
if (wi.retries < wiq.maxretries || msg.ignoremaxretries) {
if ((wi.retries + 1) < wiq.maxretries || msg.ignoremaxretries) {
wi.retries += 1;
retry = true;
wi.state = "new";
Expand Down

0 comments on commit 30adf91

Please sign in to comment.