-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
helpThis issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessaryThis issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessary
Description
This is an interesting issue in that the 'disconnected' event is never triggered when the MongoDB is brought down. We are running MongoDB through a Docker container and running a local node.js file.
We are using the latest Mongoose version 5.7.3.
When we tried an older version 5.0.12 it works. We found a similar issue that was described as being fixed in 5.0.12 from this ticket ("error event not triggered #6131") and indeed in 5.0.12 we did properly receive the 'disconnected' event when we closed the MongoDB container.
So it seems this bug has regressed and is back in latest version
mongoose.connection.on('disconnected', () => { console.log('DISCONNECTED!'); });
Metadata
Metadata
Assignees
Labels
helpThis issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessaryThis issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessary