examples/channels/qos_aka_prefetch.rb in amqp-0.8.0.rc12 vs examples/channels/qos_aka_prefetch.rb in amqp-0.8.0.rc13

- old
+ new

@@ -11,12 +11,12 @@ puts "=> Channel#prefetch" puts AMQP.start(:host => 'localhost') do |connection| ch = AMQP::Channel.new - ch.on_error do |ex| - raise "Oops! there has been a channel-level exception" + ch.on_error do |ch, channel_close| + raise "Oops! a channel-level exception: #{channel_close.inspect}" end ch.prefetch(1, false) do |_| puts "qos callback has fired" end @@ -27,8 +27,8 @@ connection.close { EM.stop { exit } } end - Signal.trap "INT", show_stopper + Signal.trap "INT", &show_stopper EM.add_timer(1, show_stopper) end