# File lib/moped/cluster.rb, line 272
    def with_secondary(&block)
      available_nodes = available_secondary_nodes
      while node = available_nodes.shift
        begin
          return yield(node)
        rescue Errors::ConnectionFailure, Errors::ReplicaSetReconfigured => e
          next
        end
      end
      raise Errors::ConnectionFailure, "Could not connect to a secondary node for replica set #{inspect}"
    end