We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f820c13 commit fb6b5f0Copy full SHA for fb6b5f0
index.js
@@ -290,12 +290,14 @@ var MongodbDriver = Base.extend({
290
};
291
292
// Get a connection to mongo
293
- this.connection.connect(this.connectionString, function(err, db) {
+ this.connection.connect(this.connectionString, function(err, mongoClient) {
294
295
if(err) {
296
prCB(err);
297
}
298
299
+ const db = mongoClient.db();
300
+
301
// Callback function to return mongo records
302
var callbackFunction = function(err, data) {
303
@@ -304,7 +306,7 @@ var MongodbDriver = Base.extend({
304
306
305
307
308
prCB(null, data);
- db.close();
309
+ mongoClient.close();
310
311
312
// Depending on the command, we need to use different mongo methods
0 commit comments