This commit is contained in:
Connor Peet
2023-01-19 20:03:47 -08:00
parent 8965c48d30
commit c010101bc4
5 changed files with 24 additions and 11 deletions

View File

@@ -34,6 +34,7 @@ pub fn new_msgpack_rpc() -> rpc::RpcBuilder<MsgPackSerializer> {
rpc::RpcBuilder::new(MsgPackSerializer {})
}
#[allow(clippy::read_zero_byte_vec)] // false positive
pub async fn start_msgpack_rpc<C: Send + Sync + 'static, S>(
dispatcher: rpc::RpcDispatcher<MsgPackSerializer, C>,
read: impl AsyncRead + Unpin,
@@ -76,5 +77,7 @@ pub async fn start_msgpack_rpc<C: Send + Sync + 'static, S>(
},
r = shutdown_rx.recv() => return Ok(r),
}
write.flush().await?;
}
}