Skip to content

Commit

Permalink
Update libshvrpc-rs
Browse files Browse the repository at this point in the history
  • Loading branch information
Fanda Vacek committed Oct 12, 2024
1 parent 6342c94 commit 0feae34
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "shvcall"
version = "3.2.0"
version = "3.2.1"
edition = "2021"

[features]
Expand Down
10 changes: 6 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,9 +385,11 @@ async fn make_call(mut frame_reader: BoxedFrameReader, mut frame_writer: BoxedFr
let rqid = send_request(&mut *frame_writer, &path, &method, &param).await?;
async fn read_meta(frame_reader: &mut BoxedFrameReader, rq_id: RqId) {
loop {
if let Ok(RpcFrameReception::Meta { request_id, shv_path, method, ..}) = frame_reader.receive_frame_or_meta().await {
if request_id.unwrap_or_default() == rq_id && method.is_none() && shv_path.is_none() {
break;
if let Ok(RpcFrameReception::MetaAnnouncement { response_id, ..}) = frame_reader.receive_frame_or_meta().await {
if let Some(response_id) = response_id {
if response_id == rq_id {
break;
}
}
}
}
Expand All @@ -403,7 +405,7 @@ async fn make_call(mut frame_reader: BoxedFrameReader, mut frame_writer: BoxedFr
return match frame_reader.receive_frame_or_meta().await {
Ok(frame) => {
match frame {
RpcFrameReception::Meta { .. } => {
RpcFrameReception::MetaAnnouncement { .. } => {
Err("Unexpected meta received.".into())
}
RpcFrameReception::Frame(frame) => {
Expand Down

0 comments on commit 0feae34

Please sign in to comment.