From 1240631840060f98b493c3cd01120ac2b65e88f2 Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Mon, 16 Oct 2023 19:40:09 +0200 Subject: [PATCH] fix(websocket): Fix argument mismatch, fixes #661 (#663) --- .changes/websocket-fix-arg-name.md | 5 +++++ plugins/websocket/src/lib.rs | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changes/websocket-fix-arg-name.md diff --git a/.changes/websocket-fix-arg-name.md b/.changes/websocket-fix-arg-name.md new file mode 100644 index 00000000..dd2bbc90 --- /dev/null +++ b/.changes/websocket-fix-arg-name.md @@ -0,0 +1,5 @@ +--- +"websocket": patch +--- + +Fix argument name mismatch that caused issues when options where provided. diff --git a/plugins/websocket/src/lib.rs b/plugins/websocket/src/lib.rs index 164a0a09..9778ac6f 100644 --- a/plugins/websocket/src/lib.rs +++ b/plugins/websocket/src/lib.rs @@ -96,10 +96,10 @@ async fn connect( window: Window, url: String, on_message: Channel, - config: Option, + options: Option, ) -> Result { let id = rand::random(); - let (ws_stream, _) = connect_async_with_config(url, config.map(Into::into), false).await?; + let (ws_stream, _) = connect_async_with_config(url, options.map(Into::into), false).await?; tauri::async_runtime::spawn(async move { let (write, read) = ws_stream.split();