fix: memory leaks and unoptimized websocket broadcasts

This commit is contained in:
Riz Ashraf committed 2026-09-21 08:22:25 +01:00
1 parent 9b349e6459
commit 573c9586fd
2 files changed
+22 -17

No files matched your search

+2 -2
View File
@@ -514,7 +514,7 @@ async fn handle_socket(socket: WebSocket, state: Arc<AppState>, client_type: Str
.collect();
for client_tx in senders {
let _ = client_tx.send(event.to_string()).await;
let _ = client_tx.try_send(event.to_string());
}
}
} // End if proxy
@@ -642,7 +642,7 @@ async fn nvim_telemetry_handler(
let msg_str = ws_msg.to_string();
let senders: Vec<_> = state.clients.read().unwrap().values().cloned().collect();
for tx in senders {
let _ = tx.send(msg_str.clone()).await;
let _ = tx.try_send(msg_str.clone());
}
axum::Json(serde_json::json!({"status": "ok"}))