lib/amqp-spec/amqp.rb in amqp-spec-0.2.7 vs lib/amqp-spec/amqp.rb in amqp-spec-0.3.0

- old
+ new

@@ -1,7 +1,8 @@ require 'mq' +# Monkey patching some methods into AMQP to make it more testable module AMQP # Initializes new AMQP client/connection without starting another EM loop def self.start_connection(opts={}, &block) # puts "!!!!!!!!! Existing connection: #{@conn}" if @conn @@ -22,11 +23,11 @@ end # Cleans up AMQP state after AMQP connection closes def self.cleanup_state # MQ.reset ? - Thread.list.each {|thread| thread[:mq] = nil } - Thread.list.each {|thread| thread[:mq_id] = nil } - @conn = nil - @closing = false + Thread.list.each { |thread| thread[:mq] = nil } + Thread.list.each { |thread| thread[:mq_id] = nil } + @conn = nil + @closing = false end end \ No newline at end of file