mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
Mysql - Only call done if it exists.
This commit is contained in:
parent
290b2ea790
commit
799eee3873
@ -159,7 +159,7 @@ module.exports = function(RED) {
|
|||||||
status = {fill:"green",shape:"dot",text:"OK"};
|
status = {fill:"green",shape:"dot",text:"OK"};
|
||||||
node.status(status);
|
node.status(status);
|
||||||
}
|
}
|
||||||
done();
|
if (done) { done(); }
|
||||||
// if (node.mydbConfig.pool._freeConnections.indexOf(node.mydbConfig.connection) === -1) {
|
// if (node.mydbConfig.pool._freeConnections.indexOf(node.mydbConfig.connection) === -1) {
|
||||||
// node.mydbConfig.connection.release();
|
// node.mydbConfig.connection.release();
|
||||||
// }
|
// }
|
||||||
@ -172,7 +172,7 @@ module.exports = function(RED) {
|
|||||||
else {
|
else {
|
||||||
node.error("Database not connected",msg);
|
node.error("Database not connected",msg);
|
||||||
status = {fill:"red",shape:"ring",text:"not yet connected"};
|
status = {fill:"red",shape:"ring",text:"not yet connected"};
|
||||||
done();
|
if (done) { done(); }
|
||||||
}
|
}
|
||||||
if (!busy) {
|
if (!busy) {
|
||||||
busy = true;
|
busy = true;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "node-red-node-mysql",
|
"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",
|
"description": "A Node-RED node to read and write to a MySQL database",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"mysql": "^2.18.1"
|
"mysql": "^2.18.1"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user