Merge branch 'dev' into next

This commit is contained in:
Lucas Nogueira
2023-05-02 13:47:10 -03:00
8 changed files with 86 additions and 20 deletions
+2 -3
View File
@@ -79,15 +79,14 @@ enum WebSocketMessage {
}
#[tauri::command]
fn connect<R: Runtime>(
async fn connect<R: Runtime>(
window: Window<R>,
url: String,
callback_function: CallbackFn,
config: Option<ConnectionConfig>,
) -> Result<Id> {
let id = rand::random();
let (ws_stream, _) =
tauri::async_runtime::block_on(connect_async_with_config(url, config.map(Into::into)))?;
let (ws_stream, _) = connect_async_with_config(url, config.map(Into::into)).await?;
tauri::async_runtime::spawn(async move {
let (write, read) = ws_stream.split();