mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 18:18:55 +00:00
fix(gui-client): remove timeout from opening deep-link (#9475)
This timeout seems to be problematic as deep-links don't open with it at all. This is a regression from #9445.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||
#![cfg_attr(test, allow(clippy::unwrap_used))]
|
||||
|
||||
use std::{process::ExitCode, time::Duration};
|
||||
use std::process::ExitCode;
|
||||
|
||||
use anyhow::{Context as _, Result, bail};
|
||||
use clap::{Args, Parser};
|
||||
@@ -109,12 +109,10 @@ fn try_main(
|
||||
return Ok(());
|
||||
}
|
||||
Some(Cmd::OpenDeepLink(deep_link)) => {
|
||||
rt.block_on(tokio::time::timeout(
|
||||
Duration::from_secs(10),
|
||||
deep_link::open(deep_link.url),
|
||||
))
|
||||
.context("Timed out while opening deep-link")?
|
||||
.context("Failed to open deep-link")?;
|
||||
tracing::info!("Opening deep-link");
|
||||
|
||||
rt.block_on(deep_link::open(deep_link.url))
|
||||
.context("Failed to open deep-link")?;
|
||||
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
@@ -44,6 +44,8 @@ pub async fn open(url: url::Url) -> Result<()> {
|
||||
.await
|
||||
.context("Failed to send deep-link")?;
|
||||
|
||||
tracing::debug!("Sent deep-link, waiting for response");
|
||||
|
||||
let response = read
|
||||
.next()
|
||||
.await
|
||||
@@ -52,6 +54,8 @@ pub async fn open(url: url::Url) -> Result<()> {
|
||||
|
||||
anyhow::ensure!(response == ServerMsg::Ack);
|
||||
|
||||
tracing::info!("Primary instance acknowledged deep-link, goodbye!");
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user