Merge pull request #5241 from kazuhitoyokoi/master-fixhttprequest

Show requesting status correctly in http request node when multiple processes are working
pull/5263/head
Nick O'Leary 2025-08-28 13:52:30 +01:00 committed by GitHub
commit 65785be169
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -152,7 +152,9 @@ in your Node-RED user directory (${RED.settings.userDir}).
const asLowercase = name.toLowercase();
return headersObject[Object.keys(headersObject).find(k => k.toLowerCase() === asLowercase)];
}
this.count = 0;
this.on("input",function(msg,nodeSend,nodeDone) {
node.count++;
checkNodeAgentPatch();
//reset redirectList on each request
redirectList = [];
@ -658,7 +660,10 @@ in your Node-RED user directory (${RED.settings.userDir}).
catch(e) { node.warn(RED._("httpin.errors.json-error")); }
}
}
node.status({});
node.count--;
if (node.count === 0) {
node.status({});
}
nodeSend(msg);
nodeDone();
}).catch(err => {