From b32511d875786fe2428e275e198cdbeccfeb4c1e Mon Sep 17 00:00:00 2001 From: Kristina Date: Thu, 9 Feb 2012 16:30:32 -0500 Subject: Extend writelock during stepdown to include socket close SERVER-4619 --- db/repl/rs.cpp | 6 +----- 1 file changed, 1 insertion(+), 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) */ -- cgit v1.2.1