Topic: Mongo ReplSetConnection


I've a question about the ReplSetConnection.

My setup is a mongo ReplSet with 2 servers and a initializer file (rails 2.3.3)

       MO_SET =[@settings["hostA"], @settings["portA"]], [@settings["hostB"], @settings["portB"]], {:pool_size => 5})
       MO_DB =  MO_SET.db(@settings["database"])

If hostA is the master and hostB  goes down the error occurs

Mongo::ConnectionFailure (Failed to connect any given host:port):
  mongo (1.1.5) lib/./lib/mongo/repl_set_connection.rb:116:in `connect'

How can I prevent this because the master is still up and running?