Skip to content

Commit

Permalink
Replicaset now handles changes in the configuration of the replicaset…
Browse files Browse the repository at this point in the history
… correctly
  • Loading branch information
christkv committed Jan 6, 2012
1 parent 8408b5b commit 2ce05bc
Show file tree
Hide file tree
Showing 5 changed files with 583 additions and 247 deletions.
7 changes: 5 additions & 2 deletions lib/mongodb/admin.js
Expand Up @@ -132,11 +132,14 @@ Admin.prototype.profilingInfo = function(callback) {
self.db.databaseName = databaseName;
};

Admin.prototype.command = function(command, callback) {
Admin.prototype.command = function(command, options, callback) {
var self = this;
var args = Array.prototype.slice.call(arguments, 1);
callback = args.pop();
options = args.length ? args.shift() : {};

// Execute a command
this.db.executeDbAdminCommand(command, function(err, result) {
this.db.executeDbAdminCommand(command, options, function(err, result) {
// Ensure change before event loop executes
return callback != null ? callback(err, result) : null;
});
Expand Down

0 comments on commit 2ce05bc

Please sign in to comment.