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