mongodb/node-mongodb-native — pull request #793 by m4tty (2012-12-07 20:56:51+00:00)
Title: 791 fix

Let connectHandler run before authenticate when _validateReplicaSet fires. connectHandler fires with newly identified server in order to update secondaries state prior to running db.authenticate, so that when db.authenticate does run the replset state is correct (as db.authenticate has dependency on replset state to get allrawconnections - and we must authenticate against all of them) so we don't get authorization errors against new secondaries connections.