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:
parent
91b32ffc15
commit
b71a69891e
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user