Skip to content

Commit

Permalink
close upstream channel on channel errors
Browse files Browse the repository at this point in the history
  • Loading branch information
carlhoerberg committed May 6, 2024
1 parent 6f57fdc commit 6ea3c69
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/amqproxy/upstream.cr
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ module AMQProxy
when AMQ::Protocol::Frame::Channel::OpenOk # we assume it always succeeds
when AMQ::Protocol::Frame::Channel::CloseOk # when channel pool requested channel close
else
if frame.is_a? AMQ::Protocol::Frame::Channel::Close
@unsafe_channels.add(frame.channel)
end
if downstream_channel = @channels[frame.channel]?
downstream_channel.write(frame)
else
Expand Down

0 comments on commit 6ea3c69

Please sign in to comment.