lib/right_amqp/amqp/client.rb in right_amqp-0.8.6 vs lib/right_amqp/amqp/client.rb in right_amqp-0.8.7

- old
+ new

@@ -27,10 +27,11 @@ when Protocol::Connection::Tune # Use frame_max received from broker so that adapt properly to RabbitMQ 2.4.1 # expecting 131,072 and RabbitMQ 3.4.1 that is configured to 0 meaning unlimited # because it will otherwise reject requests larger than this and fail the connection + @frame_max = method.frame_max send Protocol::Connection::TuneOk.new(:channel_max => 0, :frame_max => method.frame_max, :heartbeat => @settings[:heartbeat] || 0) send Protocol::Connection::Open.new(:virtual_host => @settings[:vhost], @@ -166,9 +167,13 @@ end end def connected? @connected + end + + def frame_max + @frame_max end def unbind log 'disconnected' @connected = false