diff options
Diffstat (limited to 'src/mongo/db/dbcommands.cpp')
-rw-r--r-- | src/mongo/db/dbcommands.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/dbcommands.cpp b/src/mongo/db/dbcommands.cpp index 49241865972..3344814524e 100644 --- a/src/mongo/db/dbcommands.cpp +++ b/src/mongo/db/dbcommands.cpp @@ -639,8 +639,8 @@ namespace mongo { virtual LockType locktype() const { return NONE; } CmdGetOpTime() : Command("getoptime") { } bool run(const string& dbname, BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result, bool fromRepl) { - writelock l( "" ); - result.appendDate("optime", OpTime::now().asDate()); + mutex::scoped_lock lk(OpTime::m); + result.appendDate("optime", OpTime::now(lk).asDate()); return true; } } cmdgetoptime; |