Skip to content

Commit

Permalink
rubocop fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
carlhoerberg committed Mar 24, 2024
1 parent 71529fc commit f444e19
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/amqp/client/channel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ def wait_for_confirms

ok = @unconfirmed_empty.pop
raise Error::Closed.new(@id, *@closed) if ok.nil?

ok
end

Expand All @@ -431,7 +432,11 @@ def confirm(args)

ok = ack_or_nack == :ack
@unconfirmed_empty.push(ok) until @unconfirmed_empty.num_waiting.zero?
@unconfirmed_empty.pop if @unconfirmed_empty.length > 0 # don't leave a residual ok in the queue
begin
@unconfirmed_empty.pop(true) # don't leave a residual ok in the queue
rescue ThreadError
nil
end
end

# @!endgroup
Expand Down

0 comments on commit f444e19

Please sign in to comment.