summaryrefslogtreecommitdiff
path: root/db/repl/rs.cpp
diff options
context:
space:
mode:
authorAntonin Kral <a.kral@bobek.cz>2012-05-10 06:57:57 +0200
committerAntonin Kral <a.kral@bobek.cz>2012-05-10 06:57:57 +0200
commit8813daaab256108f7aa6300875e8562d031f2c2f (patch)
tree06daade9022f76b2775d23f4613817365a2ded99 /db/repl/rs.cpp
parentd72a59184a3d51b17b30ed20fe656421bd4d2248 (diff)
parent61619b3142c1de8f60f91964ff2656054d4f11a6 (diff)
downloadmongodb-8813daaab256108f7aa6300875e8562d031f2c2f.tar.gz
Merge tag 'upstream/2.0.5'
Upstream version 2.0.5
Diffstat (limited to 'db/repl/rs.cpp')
-rw-r--r--db/repl/rs.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/db/repl/rs.cpp b/db/repl/rs.cpp
index 23abc24..9181fe9 100644
--- a/db/repl/rs.cpp
+++ b/db/repl/rs.cpp
@@ -119,8 +119,6 @@ namespace mongo {
return max;
}
- const bool closeOnRelinquish = true;
-
void ReplSetImpl::relinquish() {
LOG(2) << "replSet attempting to relinquish" << endl;
if( box.getState().primary() ) {
@@ -129,9 +127,7 @@ namespace mongo {
log() << "replSet relinquishing primary state" << rsLog;
changeState(MemberState::RS_SECONDARY);
- }
-
- if( closeOnRelinquish ) {
+
/* close sockets that were talking to us so they don't blithly send many writes that will fail
with "not master" (of course client could check result code, but in case they are not)
*/