christkv/node-mongodb-native — comment on commit 96804001819e9d0bf5f766d4d21f073a41ae96f7
File: lib/mongodb/db.js line 1014
By christkv:

I don't know what your code is doing but you need to do

db.open(function(err, db) {
//if db leve otherwise db.admin().authenticate
db.authenticate("a", "b", function(err, result) {
// the rest of your app.
});
})

if the driver is not started up correctly it's in an unknown state and any things fired during that period will be lost or cause undefined behavior.