title: AutoReconnect exception "master has changed"
body: <p>Having some trouble understanding the right approach here.</p>
  
  <p>I have a connection to a mongodb replica set with three members (standard master-slave-slave).  Everything is working fine with the connection when the master remains consistent.</p>
  
  <pre><code>pymongo.Connection(['host1:27017','host2:27018','host3:27019']).database_test
  </code></pre>
  
  <p>For some reason, when the replica set primary steps down, this starts to throw an autoreconnect exception that <strong>doesn't go away even after a new primary is elected.</strong></p>
  
  <p>Now I am aware that this exception needs to be caught and handled, most likely by waiting for the new primary to be elected.  The problem I am having seems to be that it doesn't care at all once the new primary has been chosen.  This "master has changed" exception just keeps coming up.</p>
  
  <p>Printing the connection with <code>__dict__</code> shows all three hosts.</p>
  
  <p>I've tried passing the <code>replicaset</code> kwarg to the connection, but this comes up as an unexpected argument.  </p>
  
  <p>Is there a reason why this kind of connection wouldn't just start querying against the new primary?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>This same problem is apparently now manifesting on the deployment server.  The autoreconnect  exception is thrown if the master changes at all and never goes away even after a new primary is elected.</p>
  
  <p>Pymongo is version 2.2 and mongodb version 2.0.2.  Changing the manner in which the connection is defined in the pymongo code (mongouri vs. list of hosts) has no effect.  The only way to revive the service is to <code>rs.stepDown()</code> the other hosts until the original master is primary once more.</p>