From 28ec7a11fbdcfc1486763ad15abbc3bb0ddc0df0 Mon Sep 17 00:00:00 2001 From: Xiliang Chen Date: Tue, 3 Oct 2023 16:37:14 +1300 Subject: [PATCH] add more loggings (#105) --- src/extensions/client/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/extensions/client/mod.rs b/src/extensions/client/mod.rs index 1692595..efcd237 100644 --- a/src/extensions/client/mod.rs +++ b/src/extensions/client/mod.rs @@ -130,8 +130,11 @@ impl Client { let ws = Arc::new(ws); let ws2 = ws.clone(); + tracing::info!("Endpoint connected"); + tokio::spawn(async move { ws2.on_disconnect().await; + tracing::info!("Endpoint disconnected"); if let Err(e) = disconnect_tx.send(()).await { tracing::warn!("Unable to send disconnect: {}", e); } @@ -315,6 +318,7 @@ impl Client { tracing::trace!("Received message {message:?}"); match message { Some(Message::RotateEndpoint) => { + tracing::info!("Rotate endpoint"); ws = build_ws().await; } Some(message) => handle_message(message, ws.clone()),