Skip to content

Commit

Permalink
always negotiate 4096 frames with upstream server
Browse files Browse the repository at this point in the history
So that downstream clients who defaults to 4096 don't get surprised when
larger frames comes from upstream.

Fixes #155
  • Loading branch information
carlhoerberg committed Mar 28, 2024
1 parent 536064e commit 62bf364
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/amqproxy/upstream.cr
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ module AMQProxy
case tune = AMQ::Protocol::Frame.from_io(@socket)
when AMQ::Protocol::Frame::Connection::Tune
channel_max = tune.channel_max.zero? ? UInt16::MAX : tune.channel_max
tune_ok = AMQ::Protocol::Frame::Connection::TuneOk.new(channel_max, tune.frame_max, tune.heartbeat)
tune_ok = AMQ::Protocol::Frame::Connection::TuneOk.new(channel_max, 4096, tune.heartbeat)
@socket.write_bytes tune_ok, IO::ByteFormat::NetworkEndian
@socket.flush
when AMQ::Protocol::Frame::Connection::Close
Expand Down

0 comments on commit 62bf364

Please sign in to comment.