Removed signal warnings from use_websocket's send... methods

This commit is contained in:
Maccesch 2024-02-19 23:14:33 +00:00
parent 072a7f12a2
commit 4da91b4427
2 changed files with 6 additions and 2 deletions

View file

@ -5,6 +5,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] -
### Fix 🍕
- Removed signal warnings from `use_websocket`'s `send...` methods.
### Changes 🔥
- `use_color_mode` now supports detection from an url query parameter. (thanks to @mondeja)

View file

@ -402,7 +402,7 @@ pub fn use_websocket_with_options(
// Send text (String)
let send = {
Box::new(move |data: &str| {
if ready_state.get() == ConnectionReadyState::Open {
if ready_state.get_untracked() == ConnectionReadyState::Open {
if let Some(web_socket) = ws_ref.get_value() {
let _ = web_socket.send_with_str(data);
}
@ -412,7 +412,7 @@ pub fn use_websocket_with_options(
// Send bytes
let send_bytes = move |data: Vec<u8>| {
if ready_state.get() == ConnectionReadyState::Open {
if ready_state.get_untracked() == ConnectionReadyState::Open {
if let Some(web_socket) = ws_ref.get_value() {
let _ = web_socket.send_with_u8_array(&data);
}