-
Notifications
You must be signed in to change notification settings - Fork 160
Closed
Labels
Milestone
Description
Aloha !
I'm working on a client for Rust and I'm testing sending calls in batches by adding multiple ProcedureCalls in a single request. The code looks like this:
let client = krpc_mars::RPCClient::connect("Example", "127.0.0.1:50000")?;
let (bodies, vessel, ut_stream) = mk_rpc_call!(&client, {
&space_center::get_bodies();
&space_center::get_active_vessel();
&krpc_mars::mk_stream(&space_center::get_ut()); // <-- stream request
})?; Since I forgot to connect to the stream server I get the following:
RequestFailure(service: "KRPC" name: "InvalidOperationException" description: "No stream client is connected for this RPC client" stack_trace: "
at KRPC.Core.AddStream (IClient rpcClient, KRPC.Service.Stream stream, Boolean requireNew) [0x00000] in <filename unknown>:0
at KRPC.Service.KRPC.KRPC.AddStream (KRPC.Service.Messages.ProcedureCall call, Boolean start) [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 ")
However, the other two requests are valid and should return a result. Instead, the error is set in the Response message instead of the corresponding ProcedureResult message and the whole batch fails.
Reactions are currently unavailable