Skip to content

Commit

Permalink
Tiny
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitryDodzin committed Jan 28, 2025
1 parent 9fd566f commit 17f461b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions mirrord/cli/src/external_proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ pub async fn proxy(listen_port: u16, watch: drain::Watch) -> CliResult<()> {
let mut analytics = AnalyticsReporter::new(config.telemetry, execution_kind, watch);
(&config).collect_analytics(analytics.get_mut());

// This connection is just to keep the agent alive as long as the client side is running.
let mut own_agent_conn =
connect_and_ping(&config, agent_connect_info.clone(), &mut analytics).await?;

let tls_acceptor = create_external_proxy_tls_acceptor(&config).await?;
let listener = create_listen_socket(SocketAddr::new(
local_ip().unwrap_or_else(|_| Ipv4Addr::UNSPECIFIED.into()),
Expand All @@ -101,11 +105,6 @@ pub async fn proxy(listen_port: u16, watch: drain::Watch) -> CliResult<()> {
config.external_proxy.start_idle_timeout,
)));

// This connection is just to keep the agent alive as long as the client side is running.
let mut own_agent_conn = connect_and_ping(&config, agent_connect_info.clone(), &mut analytics)
.await
.inspect_err(|_| cancellation_token.cancel())?;

let mut ping_pong_ticker = tokio::time::interval(Duration::from_secs(30));

loop {
Expand Down

0 comments on commit 17f461b

Please sign in to comment.