mongodb/mongo-azure — pull request #12 by jbrinkman (2014-02-18 23:02:54+00:00)
Title: GetLocalSlaveOkConnection call is incorrect

The call to GetLocalSlaveOkConnection was adding the instance number to the mongodPort which resulted in incorrect behavior. The port number is retrieved from each local webrole instance and doesn't need to be "adjusted" since it is already correct.

The original code was resulting in a large number of 'Unable to connect to server localhost:27022' errors since the instance 2 (running on port 27020) was trying to test for a connection to mongod on the wrong IP address.