fastify-mongoose-driver
Advanced tools
Comparing version 3.0.0 to 4.0.0
@@ -94,4 +94,7 @@ "use strict"; | ||
// Close connection when app is closing | ||
fastify.addHook("onClose", app => { | ||
return app.mongoose.instance.connection.close(); | ||
fastify.addHook("onClose", (app, done) => { | ||
app.mongoose.instance.connection.on("close", function() { | ||
done(); | ||
}); | ||
app.mongoose.instance.connection.close(); | ||
}); | ||
@@ -98,0 +101,0 @@ |
{ | ||
"name": "fastify-mongoose-driver", | ||
"description": "A Fastify plugin to connect to a MongoDB instance via the Mongoose ODM", | ||
"version": "3.0.0", | ||
"version": "4.0.0", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "scripts": { |
49557
230