Skip to content

Commit

Permalink
finish command before moving into respond_async
Browse files Browse the repository at this point in the history
  • Loading branch information
chippers committed May 1, 2021
1 parent df58770 commit 4651bed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/tauri-macros/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ pub fn generate_command(function: ItemFn) -> TokenStream {
#vis fn #fn_wrapper<P: ::tauri::Params>(message: ::tauri::InvokeMessage<P>) {
use ::tauri::command::FromCommand;
#invoke_args
message.respond_async(async move { #return_value })
let result = #return_value;
message.respond_async(::std::future::ready(result))
}
}
}
Expand Down

0 comments on commit 4651bed

Please sign in to comment.