summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorKristina <kristina@10gen.com>2012-02-09 16:30:32 -0500
committerAndy Schwerin <schwerin@10gen.com>2012-04-17 14:35:17 -0400
commitb32511d875786fe2428e275e198cdbeccfeb4c1e (patch)
treea9b32c76e5c485ffc094fbb5c047ed9113177d8f /db
parent30f515ac163e4b930fd7c65703d6cab5f7b1a96a (diff)
downloadmongo-b32511d875786fe2428e275e198cdbeccfeb4c1e.tar.gz
Extend writelock during stepdown to include socket close SERVER-4619
Diffstat (limited to 'db')
-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 23abc24931d..9181fe908b1 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)
*/