mirror of https://github.com/node-red/node-red.git
Make sure buffers are nulled to ensure cleanup.
parent
c61d4d3209
commit
6f6ecfc7a8
|
@ -135,6 +135,7 @@ module.exports = function(RED) {
|
|||
buf.copy(m,0,0,i+1);
|
||||
if (node.serialConfig.bin !== "bin") { m = m.toString(); }
|
||||
node.send({"payload": m});
|
||||
m = null;
|
||||
}, node.serialConfig.newline);
|
||||
i = 0;
|
||||
buf[0] = msg;
|
||||
|
@ -149,6 +150,7 @@ module.exports = function(RED) {
|
|||
buf.copy(m,0,0,i-1);
|
||||
if (node.serialConfig.bin !== "bin") { m = m.toString(); }
|
||||
node.send({"payload":m});
|
||||
m = null;
|
||||
i = 0;
|
||||
}
|
||||
}
|
||||
|
@ -161,6 +163,7 @@ module.exports = function(RED) {
|
|||
buf.copy(m,0,0,i);
|
||||
if (node.serialConfig.bin !== "bin") { m = m.toString(); }
|
||||
node.send({"payload":m});
|
||||
m = null;
|
||||
i = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -152,6 +152,7 @@ module.exports = function(RED) {
|
|||
if (err) {
|
||||
node.error("udp : "+err);
|
||||
}
|
||||
message = null;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue