feat(windows): enable crash handling on release builds (#3441)

Since #3263 closed, we could enable crash handling for release builds on
Windows, too.
This should get rid of a dead code warning in CI:


![image](https://github.com/firezone/firezone/assets/13400041/7a6cd0ed-5943-4fa5-a23f-1426aa438f51)

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
This commit is contained in:
Reactor Scram
2024-01-30 15:17:25 -06:00
committed by GitHub
parent aa25a46b72
commit 9096eee396

View File

@@ -20,7 +20,6 @@ const SOCKET_NAME: &str = "dev.firezone.client.crash_handler";
/// <https://github.com/EmbarkStudios/crash-handling/blob/main/minidumper/examples/diskwrite.rs>
/// Linux has a special `set_ptracer` call that is handy
/// MacOS needs a special `ping` call to flush messages inside the crash handler
#[cfg(all(debug_assertions, target_os = "windows"))]
pub(crate) fn attach_handler() -> Result<CrashHandler> {
// Attempt to connect to the server
let (client, _server) = start_server_and_connect()?;
@@ -39,11 +38,6 @@ pub(crate) fn attach_handler() -> Result<CrashHandler> {
Ok(handler)
}
#[cfg(not(debug_assertions))]
pub(crate) fn attach_handler() -> Result<CrashHandler> {
bail!("crash handling is disabled in release builds for now");
}
/// Main function for the server process, for out-of-process crash handling.
///
/// The server process seems to be the preferred method,