mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
fix(headless-client): stop telemetry while connlib is active (#7109)
Flushing events to Sentry requires us to be able to resolve domain names. This is only possible while connlib is active or completely disabled. Without this, stopping telemetry pretty much always times out for me on my local machine when using the headless-client.
This commit is contained in:
@@ -200,7 +200,7 @@ fn main() -> Result<()> {
|
||||
// The name matches that in `ipc_service.rs`
|
||||
let mut last_connlib_start_instant = Some(Instant::now());
|
||||
|
||||
let result = rt.block_on(async {
|
||||
rt.block_on(async {
|
||||
let ctx = firezone_telemetry::TransactionContext::new(
|
||||
"connect_to_firezone",
|
||||
"Connecting to Firezone",
|
||||
@@ -325,13 +325,11 @@ fn main() -> Result<()> {
|
||||
tracing::error!(?error, "network notifier");
|
||||
}
|
||||
|
||||
telemetry.stop(); // Stop telemetry before dropping session. `connlib` needs to be active for this, otherwise we won't be able to resolve the DNS name for sentry.
|
||||
session.disconnect();
|
||||
|
||||
result
|
||||
});
|
||||
|
||||
telemetry.stop();
|
||||
result
|
||||
})
|
||||
}
|
||||
|
||||
/// Read the token from disk if it was not in the environment
|
||||
|
||||
Reference in New Issue
Block a user