class Protobuf::Rpc::Connectors::Zmq
def send_request_with_lazy_pirate
of retries, fail the request.
If we haven't received a legitimate response in the CLIENT_RETRIES number
Trying a number of times, attempt to get a response from the server.
def send_request_with_lazy_pirate attempt = 0 timeout = options[:timeout].to_f @stats.request_size = @request_data.size begin attempt += 1 send_request_with_timeout(timeout, attempt) parse_response rescue RequestTimeout retry if attempt < CLIENT_RETRIES fail(:RPC_FAILED, "The server repeatedly failed to respond within #{timeout} seconds") rescue => e fail(:RPC_FAILED, "Unexpected error sending request: #{e}") end end