# File lib/phusion_passenger/analytics_logger.rb, line 179
        def initialize(logging_agent_address, username, password, node_name)
                @server_address = logging_agent_address
                @username = username
                @password = password
                if node_name && !node_name.empty?
                        @node_name = node_name
                else
                        @node_name = `hostname`.strip
                end
                @random_dev = File.open("/dev/urandom")
                
                # This mutex protects the following instance variables, but
                # not the contents of @connection.
                @mutex = Mutex.new
                
                @connection = Connection.new(nil)
                if @server_address && local_socket_address?(@server_address)
                        @max_connect_tries = 10
                else
                        @max_connect_tries = 1
                end
                @reconnect_timeout = 1
                @next_reconnect_time = Time.utc(1980, 1, 1)
        end