fix(websocket): Fix argument mismatch, fixes #661 (#663)

This commit is contained in:
Fabian-Lars
2023-10-16 19:40:09 +02:00
committed by GitHub
parent c2103c91bc
commit 1240631840
2 changed files with 7 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"websocket": patch
---
Fix argument name mismatch that caused issues when options where provided.
+2 -2
View File
@@ -96,10 +96,10 @@ async fn connect<R: Runtime>(
window: Window<R>,
url: String,
on_message: Channel,
config: Option<ConnectionConfig>,
options: Option<ConnectionConfig>,
) -> Result<Id> {
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();