mongodb/node-mongodb-native — pull request #797 by m4tty (2012-12-10 04:44:55+00:00)
Title: fixes 791. different -perhaps better- way to fix 791.  but it extends options in db.authenticate to allow the passing of a connection.

I did this fix to show a different -better- way to fix 791. I didn't originally provide this fix as I was hesitant to impact the db.authenticate contract (even as little as I did). That said, this fix does the job without allowing the replset state to get updated unless we were able to successfully authenticate to the -potentially new- connections... while in the case of the other fix I provided, I allowed the replset state to get updated (in order to fix the bug) before calling authenticate.

At the very least the two fixes should help communicate the problem effectively. And hopefully one of them is in line with the drivers direction.