Browse files

Merge pull request #10 from yammer/frame_max

Handle the frame_max option when negotiating the connection with the server
  • Loading branch information...
2 parents 7575e2d + cea7880 commit fd16e38810adc9a83adebc37717be8f65bb0264c @famoseagle committed Feb 1, 2016
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/carrot/amqp/server.rb
View
3 lib/carrot/amqp/server.rb
@@ -26,6 +26,7 @@ def initialize(opts = {})
@user = opts[:user] || 'guest'
@pass = opts[:pass] || 'guest'
@vhost = opts[:vhost] || '/'
+ @frame_max = opts[:frame_max] || 131072
@insist = opts[:insist]
@status = 'NOT CONNECTED'
@@ -166,7 +167,7 @@ def start_session
if method.is_a?(Protocol::Connection::Tune)
send_frame(
- Protocol::Connection::TuneOk.new( :channel_max => 0, :frame_max => 131072, :heartbeat => 0)
+ Protocol::Connection::TuneOk.new( :channel_max => 0, :frame_max => @frame_max, :heartbeat => 0)
)
end

0 comments on commit fd16e38

Please sign in to comment.