Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid race between multi-message ack and publish
PR ruby-amqp#617 introduced an optimization for multi-message acks but failed to protect @unconfirmed_set. In edge cases #basic_publish would attempt to modify it during iteration with Enumerable#min: <ruby>/lib/ruby/3.1.0/set.rb:522:in `add': can't add a new key into hash during iteration (RuntimeError) from <bunny>/lib/bunny/channel.rb:555:in `block in basic_publish' from <bunny>/lib/bunny/channel.rb:554:in `synchronize' from <bunny>/lib/bunny/channel.rb:554:in `basic_publish' from <bunny>/lib/bunny/exchange.rb:141:in `publish'
- Loading branch information