mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
ping - clone msg in order to fix handling arrays of multiple requests.
This commit is contained in:
parent
c8975019ad
commit
5aa99eca73
@ -235,12 +235,12 @@ module.exports = function(RED) {
|
|||||||
let pingables = generatePingList(payload)
|
let pingables = generatePingList(payload)
|
||||||
for (let index = 0; index < pingables.length; index++) {
|
for (let index = 0; index < pingables.length; index++) {
|
||||||
const element = pingables[index];
|
const element = pingables[index];
|
||||||
if (element) { doPing(node, element, msg, false); }
|
if (element) { doPing(node, element, RED.util.cloneMessage(msg), false); }
|
||||||
}
|
}
|
||||||
} else if (Array.isArray(payload) ) {
|
} else if (Array.isArray(payload) ) {
|
||||||
for (let index = 0; index < payload.length; index++) {
|
for (let index = 0; index < payload.length; index++) {
|
||||||
const element = payload[index];
|
const element = payload[index];
|
||||||
if (element) { doPing(node, element, msg, true); }
|
if (element) { doPing(node, element, RED.util.cloneMessage(msg), true); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name" : "node-red-node-ping",
|
"name" : "node-red-node-ping",
|
||||||
"version" : "0.3.2",
|
"version" : "0.3.3",
|
||||||
"description" : "A Node-RED node to ping a remote server, for use as a keep-alive check.",
|
"description" : "A Node-RED node to ping a remote server, for use as a keep-alive check.",
|
||||||
"dependencies" : {
|
"dependencies" : {
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user