Skip to content

Commit

Permalink
feat(nats): flush after sending invocation
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Volosatovs <[email protected]>
  • Loading branch information
rvolosatovs committed Nov 22, 2024
1 parent b8185f6 commit 0f7cdee
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/transport-nats/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1116,6 +1116,12 @@ impl wrpc_transport::Invoke for Client {
.await
}
.context("failed to publish handshake")?;
let nats = Arc::clone(&self.nats);
tokio::spawn(async move {
if let Err(err) = nats.flush().await {
error!(?err, "failed to flush");
}
});
Ok((
ParamWriter::Root(RootParamWriter::new(
(*self.nats).clone(),
Expand Down

0 comments on commit 0f7cdee

Please sign in to comment.