Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
carlhoerberg committed Mar 25, 2024
1 parent 7b71150 commit c2c2067
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/amqp/client/channel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,11 @@ def confirm(args)

ok = ack_or_nack == :ack
until @unconfirmed_empty.num_waiting.zero?
@unconfirmed_empty.push(ok, timeout: 0.001) || break
begin
@unconfirmed_empty.push(ok, timeout: 0.001)
rescue ThreadError
next
end
end
@unconfirmed_empty.pop(timeout: 0) # don't leave a residual ok in the queue
end
Expand Down

0 comments on commit c2c2067

Please sign in to comment.