Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
boboshan opened this issue Oct 24, 2023 · 0 comments
Open

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

boboshan opened this issue Oct 24, 2023 · 0 comments

Comments

@boboshan
Copy link

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() ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant