Skip to content

Commit

Permalink
zm: do not reply if no-reply-expected flag is set
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelheiss-liebherr committed Jan 29, 2025
1 parent c97ddc0 commit 05fefb7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion zbus_macros/src/iface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,11 @@ pub fn expand(args: Punctuated<Meta, Token![,]>, mut input: ItemImpl) -> syn::Re
#args_from_msg
let reply = self.#ident(#args_names)#method_await;
let hdr = message.header();
#reply
if hdr.primary().flags().contains(zbus::message::Flags::NoReplyExpected) {
Ok(())
} else {
#reply
}
};
#zbus::object_server::DispatchResult::Async(::std::boxed::Box::pin(async move {
future.await
Expand Down

0 comments on commit 05fefb7

Please sign in to comment.