Mysql - Only call done if it exists.

This commit is contained in:
Dave Conway-Jones 2021-06-19 14:47:44 +01:00
parent 290b2ea790
commit 799eee3873
No known key found for this signature in database
GPG Key ID: 88BA2B8A411BE9FF
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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"