mongodb/node-mongodb-native — pull request #796 by m4tty (2012-12-10 03:29:17+00:00)
Title: fixes #791

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.

791 fix and test now separate.