lib/ruby_skynet/client.rb in ruby_skynet-0.5.0 vs lib/ruby_skynet/client.rb in ruby_skynet-0.6.0

- old
+ new

@@ -59,10 +59,10 @@ @logger.tagged request_id do @logger.benchmark_info "Called Skynet Service: #{@skynet_name}.#{method_name}" do retries = 0 # If it cannot connect to a server, try a different server begin - Connection.with_connection(Registry.server_for(@skynet_name, @version, @region), connection_params) do |connection| + Connection.with_connection(::RubySkynet.services.server_for(@skynet_name, @version, @region), connection_params) do |connection| connection.rpc_call(request_id, @skynet_name, method_name, parameters) end rescue ResilientSocket::ConnectionFailure => exc if (retries < 3) && exc.cause.is_a?(Errno::ECONNREFUSED) retries += 1