lib/pigato/client.rb in pigato-0.2.9 vs lib/pigato/client.rb in pigato-0.2.10

- old
+ new

@@ -1,10 +1,9 @@ class Pigato::Client def initialize broker, conf = {} @broker = broker - @context = ZMQ::Context.new(1) @socket = nil @conf = { :autostart => false, :timeout => 2500 @@ -68,9 +67,10 @@ end end def reconnect_to_broker stop + @context = ZMQ::Context.new @socket = @context.socket ZMQ::DEALER @context.linger = 0 @socket.identity = SecureRandom.uuid @socket.connect @broker end