def try_communicating(attempt)
      begin
        send_command({:name => "check_connectivity"}, @options[:verbose], COMMAND_IO_TIMEOUT) do |r|
          @command_io_failures = 0
          res = serialize_operation_result(r) rescue nil
          if res && res.success?
            info("Successful agent communication" + (attempt > 1 ? " on attempt #{attempt}" : ""))
            @retry_timer.cancel if @retry_timer
            check_communication(attempt)
          else
            error = (res && result.content) || "<unknown error>"
            error("Failed agent communication attempt", error, abort = false)
            # Let existing timer control next attempt
          end
        end
      rescue Exception => e
        error("Failed to access agent for communication check", e, abort = false)
      end
      true
    end
def try_communicating(attempt)
      begin
        send_command({:name => "check_connectivity"}, @options[:verbose], COMMAND_IO_TIMEOUT) do |r|
          @command_io_failures = 0
          res = serialize_operation_result(r) rescue nil
          if res && res.success?
            info("Successful agent communication" + (attempt > 1 ? " on attempt #{attempt}" : ""))
            @retry_timer.cancel if @retry_timer
            check_communication(attempt)
          else
            error = (res && result.content) || "<unknown error>"
            error("Failed agent communication attempt", error, abort = false)
            # Let existing timer control next attempt
          end
        end
      rescue Exception => e
        error("Failed to access agent for communication check", e, abort = false)
      end
      true
    end
Ask instance agent to try to communicate

 === Parameters
 attempt(Integer):: Number of attempts thus far

 === Return
 true:: Always return true