Skip to content

No "options" parameter provided in the client call function #7

@boboshan

Description

@boboshan

https://github.com/ohyo-io/wampire/blob/a901df4fa4dde4a11770f2ac7caa5ea5bff5a81c/src/client.rs#L1052C12-L1052C12

pub fn call(
    &mut self,
    procedure: URI,
    args: Option<List>,
    kwargs: Option<Dict>,
) -> Pin<Box<dyn Future<Output = Result<(List, Dict), CallError>>>> {
    info!("Calling {:?} with {:?} | {:?}", procedure, args, kwargs);

    let request_id = self.get_next_session_id();

    let (complete, receiver) = oneshot::channel();

    let mut info = self.connection_info.lock().unwrap();

    info.call_requests.insert(request_id, complete);

    info.send_message(Message::Call(
        request_id,
        CallOptions::new(),
        procedure,
        args,
        kwargs,
    ))
    .unwrap();

    Box::pin(async {
        receiver.await.unwrap_or(Err(CallError {
            reason: Reason::InternalError,
            args: None,
            kwargs: None,
        }))
    })
}

Why is there a blank call option in info.send_message() ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions