mirror of
https://github.com/adoyle0/leptos-use.git
synced 2025-03-13 09:09:48 -04:00
fixed merge artifacts
This commit is contained in:
parent
e00f461ea7
commit
9df6281ff7
2 changed files with 9 additions and 11 deletions
|
@ -73,6 +73,7 @@ exclude = ["ssr", "use_webtransport_with_server"]
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
leptos = { git = "https://github.com/leptos-rs/leptos" }
|
leptos = { git = "https://github.com/leptos-rs/leptos" }
|
||||||
|
codee = { version = "0.2" }
|
||||||
console_error_panic_hook = "0.1"
|
console_error_panic_hook = "0.1"
|
||||||
console_log = "1"
|
console_log = "1"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
|
@ -94,8 +95,5 @@ panic = "abort"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
|
|
||||||
[workspace.dependencies]
|
|
||||||
codee = { version = "0.2" }
|
|
||||||
|
|
||||||
[package.metadata.leptos]
|
[package.metadata.leptos]
|
||||||
lib-profile-release = "wasm-release"
|
lib-profile-release = "wasm-release"
|
||||||
|
|
|
@ -239,8 +239,8 @@ where
|
||||||
Tx: Send + Sync + 'static,
|
Tx: Send + Sync + 'static,
|
||||||
Rx: Send + Sync + 'static,
|
Rx: Send + Sync + 'static,
|
||||||
C: Encoder<Tx> + Decoder<Rx>,
|
C: Encoder<Tx> + Decoder<Rx>,
|
||||||
C: HybridEncoder<Tx, <C as Encoder<Tx>>::Encoded, Error = <C as Encoder<Tx>>::Error>,
|
C: HybridEncoder<Tx, <C as Encoder<Tx>>::Encoded, Error=<C as Encoder<Tx>>::Error>,
|
||||||
C: HybridDecoder<Rx, <C as Decoder<Rx>>::Encoded, Error = <C as Decoder<Rx>>::Error>,
|
C: HybridDecoder<Rx, <C as Decoder<Rx>>::Encoded, Error=<C as Decoder<Rx>>::Error>,
|
||||||
{
|
{
|
||||||
use_websocket_with_options::<Tx, Rx, C>(url, UseWebSocketOptions::default())
|
use_websocket_with_options::<Tx, Rx, C>(url, UseWebSocketOptions::default())
|
||||||
}
|
}
|
||||||
|
@ -265,8 +265,8 @@ where
|
||||||
Tx: Send + Sync + 'static,
|
Tx: Send + Sync + 'static,
|
||||||
Rx: Send + Sync + 'static,
|
Rx: Send + Sync + 'static,
|
||||||
C: Encoder<Tx> + Decoder<Rx>,
|
C: Encoder<Tx> + Decoder<Rx>,
|
||||||
C: HybridEncoder<Tx, <C as Encoder<Tx>>::Encoded, Error = <C as Encoder<Tx>>::Error>,
|
C: HybridEncoder<Tx, <C as Encoder<Tx>>::Encoded, Error=<C as Encoder<Tx>>::Error>,
|
||||||
C: HybridDecoder<Rx, <C as Decoder<Rx>>::Encoded, Error = <C as Decoder<Rx>>::Error>,
|
C: HybridDecoder<Rx, <C as Decoder<Rx>>::Encoded, Error=<C as Decoder<Rx>>::Error>,
|
||||||
{
|
{
|
||||||
let url = normalize_url(url);
|
let url = normalize_url(url);
|
||||||
|
|
||||||
|
@ -309,13 +309,13 @@ where
|
||||||
if !manually_closed_ref.get_value()
|
if !manually_closed_ref.get_value()
|
||||||
&& !reconnect_limit.is_exceeded_by(reconnect_times_ref.get_value())
|
&& !reconnect_limit.is_exceeded_by(reconnect_times_ref.get_value())
|
||||||
&& ws_ref
|
&& ws_ref
|
||||||
.get_value()
|
.get_value()
|
||||||
.map_or(false, |ws: WebSocket| ws.ready_state() != WebSocket::OPEN)
|
.map_or(false, |ws: WebSocket| ws.ready_state() != WebSocket::OPEN)
|
||||||
{
|
{
|
||||||
reconnect_timer_ref.set_value(
|
reconnect_timer_ref.set_value(
|
||||||
set_timeout_with_handle(
|
set_timeout_with_handle(
|
||||||
move || {
|
move || {
|
||||||
if unmounted.get() {
|
if unmounted.load(std::sync::atomic::Ordering::Relaxed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if let Some(connect) = connect_ref.get_value() {
|
if let Some(connect) = connect_ref.get_value() {
|
||||||
|
@ -325,7 +325,7 @@ where
|
||||||
},
|
},
|
||||||
Duration::from_millis(reconnect_interval),
|
Duration::from_millis(reconnect_interval),
|
||||||
)
|
)
|
||||||
.ok(),
|
.ok(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
|
|
Loading…
Add table
Reference in a new issue