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

pull/663/head
FabianLars 2 years ago
parent 8902fe9adf
commit fc192fd877
No known key found for this signature in database
GPG Key ID: 838F329885A9C43D

@ -0,0 +1,5 @@
---
"websocket": patch
---
Fix argument name mismatch that caused issues when options where provided.

@ -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();

Loading…
Cancel
Save