lib/rrj/janus/processus/event.rb in ruby_rabbitmq_janus-1.1.9 vs lib/rrj/janus/processus/event.rb in ruby_rabbitmq_janus-1.1.10

- old
+ new

@@ -8,11 +8,12 @@ module Concurrencies # For listen standard queue ("from-janus" by default) class Event < Concurrency include Singleton - # Initialize Event object. Is used for listen an standard out queue to Janus + # Initialize Event object. Is used for listen an standard out queue to + # Janus def initialize super @publish = @response = nil end @@ -26,11 +27,11 @@ private # Initialize a thread def transaction_running - Thread.current.thread_variable_set(:publish, - Rabbit::Publisher::Listener.new(rabbit)) + publisher = Rabbit::Publisher::Listener.new(rabbit) + Thread.current.thread_variable_set(:publish, publisher) end end end end end