fix: MCP startup panic + RDP crypto provider panic
All checks were successful
Build & Sign Wraith / Build Windows + Sign (push) Successful in 2m57s

MCP: RdpService had a manual Clone impl that called unreachable!().
Replaced with a real clone that shares the DashMap. MCP server can
now clone all services and start successfully.

RDP: rustls needs CryptoProvider::install_default() before any TLS
operations. ironrdp-tls uses rustls for the RDP TLS handshake.
Added aws_lc_rs provider installation at app startup.

Both panics found via wraith.log debug logging from v1.6.3.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Vantz Stockwell 2026-03-25 11:28:46 -04:00
parent 357491b4e8
commit e6766062b1
2 changed files with 4 additions and 1 deletions

View File

@ -112,6 +112,9 @@ fn write_log(path: &std::path::Path, msg: &str) -> std::io::Result<()> {
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
// Install rustls crypto provider before any TLS operations (RDP needs this)
let _ = tokio_rustls::rustls::crypto::aws_lc_rs::default_provider().install_default();
// Initialize file-based logging to data_dir/wraith.log
let log_path = data_directory().join("wraith.log");
let _ = write_log(&log_path, "=== Wraith starting ===");

View File

@ -269,7 +269,7 @@ impl RdpService {
impl Clone for RdpService {
fn clone(&self) -> Self {
unreachable!("RdpService should not be cloned — access via State<AppState>");
Self { sessions: self.sessions.clone() }
}
}