Mongoose dropDatabase不调用回调函数

时间:2013-10-05 15:45:32

标签: node.js mongodb mongoose node-mongodb-native

dropDatabase回调存在一些问题,它从不调用。这是我的代码:

console.log(mongoose.connection.readyState); // prints 1 (connected)
var db = mongoose.connection.db;
db.dropDatabase(function() {
    console.log("dropped (callback)"); // never calls
});
console.log("dropped"); // prints "dropped"

在Mongod日志中,我看到:

Sat Oct  5 19:26:44.074 [conn278] dropDatabase test starting
Sat Oct  5 19:26:44.088 [conn278] removeJournalFiles
Sat Oct  5 19:26:44.104 [conn276] end connection 127.0.0.1:57207 (4 connections now open)
Sat Oct  5 19:26:44.105 [conn278] dropDatabase test finished

猫鼬版本为1.3.11

0 个答案:

没有答案