mirror of
				https://github.com/node-red/node-red-nodes.git
				synced 2025-03-01 10:37:43 +00: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:
		@@ -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();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user