mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
node-red-node-mysq add done() callback (#793)
This fix adds the done() callback when the query has been executed.
This commit is contained in:
parent
61a03d7cc3
commit
040bf24c4b
@ -123,7 +123,7 @@ module.exports = function(RED) {
|
||||
}
|
||||
});
|
||||
|
||||
node.on("input", function(msg) {
|
||||
node.on("input", function(msg, send, done) {
|
||||
if (node.mydbConfig.connected) {
|
||||
if (typeof msg.topic === 'string') {
|
||||
//console.log("query:",msg.topic);
|
||||
@ -160,6 +160,7 @@ module.exports = function(RED) {
|
||||
node.send(msg);
|
||||
status = {fill:"green",shape:"dot",text:"OK"};
|
||||
node.status(status);
|
||||
done();
|
||||
}
|
||||
// if (node.mydbConfig.pool._freeConnections.indexOf(node.mydbConfig.connection) === -1) {
|
||||
// node.mydbConfig.connection.release();
|
||||
|
Loading…
Reference in New Issue
Block a user