# File lib/mongo/util/node.rb, line 84
    def set_config
      @node_mutex.synchronize do
        begin
          if @config
            @last_state = @config['ismaster'] ? :primary : :other
          end

          @config = @client['admin'].command({:ismaster => 1}, :socket => @socket)

          if @config['msg']
            @client.log(:warn, "#{config['msg']}")
          end

          unless @client.mongos?
            check_set_membership(@config)
            check_set_name(@config)
          end
        rescue ConnectionFailure, OperationFailure, OperationTimeout, SocketError, SystemCallError, IOError => ex
          @client.log(:warn, "Attempted connection to node #{host_string} raised " +
                              "#{ex.class}: #{ex.message}")
          # Socket may already be nil from issuing command
          close
        end
      end
    end