mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-28 21:45:00 +03:00
finish command before moving into respond_async
This commit is contained in:
parent
df587701f7
commit
4651bed5bf
@ -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))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user