# File lib/amq/client/async/adapter.rb, line 622
        def handle_tune(connection_tune)
          @channel_max        = connection_tune.channel_max.freeze
          @frame_max          = connection_tune.frame_max.freeze

          client_heartbeat    = @settings[:heartbeat] || @settings[:heartbeat_interval] || 0

          @heartbeat_interval = negotiate_heartbeat_value(client_heartbeat, connection_tune.heartbeat)

          self.send_frame(Protocol::Connection::TuneOk.encode(@channel_max, [settings[:frame_max], @frame_max].min, @heartbeat_interval))
          self.initialize_heartbeat_sender if heartbeats_enabled?
        end