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

pull/260/merge
Fabian-Lars 2 years ago committed by GitHub
parent c2103c91bc
commit 1240631840
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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