diff --git a/storage/mysql/68-mysql.js b/storage/mysql/68-mysql.js index f09e9862..07429870 100644 --- a/storage/mysql/68-mysql.js +++ b/storage/mysql/68-mysql.js @@ -159,7 +159,7 @@ module.exports = function(RED) { status = {fill:"green",shape:"dot",text:"OK"}; node.status(status); } - done(); + if (done) { done(); } // if (node.mydbConfig.pool._freeConnections.indexOf(node.mydbConfig.connection) === -1) { // node.mydbConfig.connection.release(); // } @@ -172,7 +172,7 @@ module.exports = function(RED) { else { node.error("Database not connected",msg); status = {fill:"red",shape:"ring",text:"not yet connected"}; - done(); + if (done) { done(); } } if (!busy) { busy = true; diff --git a/storage/mysql/package.json b/storage/mysql/package.json index 66a3afab..d79438dd 100644 --- a/storage/mysql/package.json +++ b/storage/mysql/package.json @@ -1,6 +1,6 @@ { "name": "node-red-node-mysql", - "version": "0.2.0", + "version": "0.2.1", "description": "A Node-RED node to read and write to a MySQL database", "dependencies": { "mysql": "^2.18.1"