summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mongo/db/repl/replication_coordinator_impl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_impl.cpp b/src/mongo/db/repl/replication_coordinator_impl.cpp
index 66fc496f2b3..ce6b7ea64b8 100644
--- a/src/mongo/db/repl/replication_coordinator_impl.cpp
+++ b/src/mongo/db/repl/replication_coordinator_impl.cpp
@@ -1355,6 +1355,10 @@ namespace {
void ReplicationCoordinatorImpl::prepareReplSetUpdatePositionCommandHandshakes(
std::vector<BSONObj>* handshakes) {
boost::lock_guard<boost::mutex> lock(_mutex);
+ // do not send handshakes if we have been removed from the config
+ if (_selfIndex == -1) {
+ return;
+ }
// handshake objs for ourself and all chained members
for (SlaveInfoVector::const_iterator itr = _slaveInfo.begin();
itr != _slaveInfo.end(); ++itr) {