Permalink
Browse files

Only find queue instance in the channel cache when queue.declare-ok i…

…s present (this is not the case when :nowait is used)
  • Loading branch information...
1 parent da7dfbe commit b2e76ccf0fc11d41dd7db943119d2bcbf50bcbd8 @michaelklishin michaelklishin committed Feb 15, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/amqp/channel.rb
View
@@ -828,10 +828,10 @@ def queue!(name, opts = {}, &block)
Queue.new(self, name, opts)
else
shim = Proc.new { |q, method|
- queue = find_queue(method.queue)
if block.arity == 1
- block.call(queue)
+ block.call(q)
else
+ queue = find_queue(method.queue)
block.call(queue, method.consumer_count, method.message_count)
end
}

0 comments on commit b2e76cc

Please sign in to comment.