more logging notes

This commit is contained in:
Nickiel12 2024-08-20 20:50:50 -07:00
parent 5082438d6e
commit a7cad3781d

View file

@ -51,7 +51,7 @@ pub async fn connect_to_server(
let (to_core_sender, to_core_reciever) = async_channel::bounded::<ApplicationMessage>(MAX_MESSAGE);
let (to_app_events, from_app_events) = async_channel::bounded::<ApplicationMessage>(MAX_MESSAGE);
debug!("created channels for oneshote");
debug!("created channels for oneshot");
if let Err(e) = result_oneshot.send(Ok((to_core_sender as AppSender, from_app_events as AppReceiver))) {
if let Err(e2) = ws.close(None).await {
@ -61,6 +61,7 @@ pub async fn connect_to_server(
return;
}
debug!("splitting websocket!");
let (ws_sender, ws_recv) = ws.split();
let receiver_is_closed = Arc::new(AtomicBool::new(false));
@ -118,6 +119,7 @@ pub async fn send_to_wc_task(
}
info!("send_to_wc is closing!");
let _ = sender.close().await;
is_closed.store(true, std::sync::atomic::Ordering::SeqCst);
}