From b82f773d04bef314bfb069572e0d8aca0a9cefb2 Mon Sep 17 00:00:00 2001 From: dodois <73285310+dodois@users.noreply.github.com> Date: Tue, 20 Jul 2021 11:35:15 +0800 Subject: [PATCH] Update 66-mongodb.js Call done when the operation is complete --- storage/mongodb/66-mongodb.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/storage/mongodb/66-mongodb.js b/storage/mongodb/66-mongodb.js index 4b635193c..dafe4dbc7 100644 --- a/storage/mongodb/66-mongodb.js +++ b/storage/mongodb/66-mongodb.js @@ -115,6 +115,8 @@ module.exports = function(RED) { coll.save(msg.payload,function(err, item) { if (err) { node.error(err,msg); + }else { + node.done(); } }); } @@ -122,6 +124,8 @@ module.exports = function(RED) { coll.save(msg,function(err, item) { if (err) { node.error(err,msg); + }else { + node.done(); } }); } @@ -137,6 +141,8 @@ module.exports = function(RED) { coll.insert(msg.payload, function(err, item) { if (err) { node.error(err,msg); + }else { + node.done(); } }); } @@ -144,6 +150,8 @@ module.exports = function(RED) { coll.insert(msg, function(err,item) { if (err) { node.error(err,msg); + }else { + node.done(); } }); } @@ -164,6 +172,8 @@ module.exports = function(RED) { coll.update(query, payload, options, function(err, item) { if (err) { node.error(err,msg); + }else { + node.done(); } }); } @@ -171,6 +181,8 @@ module.exports = function(RED) { coll.remove(msg.payload, function(err, items) { if (err) { node.error(err,msg); + }else { + node.done(); } }); }