mongodb/node-mongodb-native — pull request #635 by alinsilvian (2012-06-12 11:32:51+00:00)
Title: Replica set member status update when primary changes

When the primary steps down the status was not properly updated. In replicaCheckFunction if the primary returned from rs.status() si different than the known one, the old master is deleted ( from "addresses" ) so it can be rediscovered with it's new role and the primary get's upgraded from it's place ( in secondaries ) to new master and deleted from secondaries ( the primary can only "evolve" from a secondary, right ? ).