|
@@ -118,6 +118,7 @@ async fn ws_handler(
|
|
) -> impl IntoResponse {
|
|
) -> impl IntoResponse {
|
|
ws.on_upgrade(|mut socket| async move {
|
|
ws.on_upgrade(|mut socket| async move {
|
|
loop {
|
|
loop {
|
|
|
|
+ tokio::time::sleep(tokio::time::Duration::from_millis(1200)).await;
|
|
if state.lock().unwrap().update {
|
|
if state.lock().unwrap().update {
|
|
socket
|
|
socket
|
|
.send(Message::Text(String::from("reload")))
|
|
.send(Message::Text(String::from("reload")))
|