summaryrefslogtreecommitdiff
path: root/db/repl/rs.cpp
diff options
context:
space:
mode:
authorAntonin Kral <a.kral@bobek.cz>2012-05-10 06:57:54 +0200
committerAntonin Kral <a.kral@bobek.cz>2012-05-10 06:57:54 +0200
commit61619b3142c1de8f60f91964ff2656054d4f11a6 (patch)
treed3aaf9d1e70cac8efa0856e5b5ba39e2fb9dc526 /db/repl/rs.cpp
parenteaaa7b30c99b89b5483e0a372bb73fe8c8695185 (diff)
downloadmongodb-61619b3142c1de8f60f91964ff2656054d4f11a6.tar.gz
Imported 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)
*/