lib/pigato/client.rb in pigato-0.4.1 vs lib/pigato/client.rb in pigato-0.4.2

- old
+ new

@@ -25,10 +25,12 @@ def request service, request, opts = {} iid = get_iid start if @@sockets[iid] == nil && @conf[:autostart] - socket = @@sockets[iid] + socket = get_socket + return nil if socket.nil? + request = [Oj.dump(request), Oj.dump(opts)] rid = SecureRandom.uuid request = [Pigato::C_CLIENT, Pigato::W_REQUEST, service, rid].concat(request) msg = ZMQ::Message.new