0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

fix isMaster() for master-master mode

This commit is contained in:
Dwight 2009-09-22 14:34:55 -04:00
parent 91b32ffc15
commit b71a69891e

View File

@ -126,6 +126,13 @@ namespace mongo {
if( replPair->state == ReplPair::State_Master )
return true;
}
else {
if( master ) {
// if running with --master --slave, allow. note that master is also true
// for repl pairs so the check for replPair above is important.
return true;
}
}
return strcmp( client, "local" ) == 0;
}