feat(gateway): shutdown after 15m of portal disconnect (#9894)

This commit is contained in:
Thomas Eizinger
2025-07-18 15:47:30 +10:00
committed by GitHub
parent df2eeb16f8
commit c4457bf203
2 changed files with 6 additions and 2 deletions

View File

@@ -20,10 +20,10 @@ use phoenix_channel::get_user_agent;
use futures::{TryFutureExt, future};
use phoenix_channel::PhoenixChannel;
use secrecy::Secret;
use std::sync::Arc;
use std::{collections::BTreeSet, path::Path};
use std::{fmt, pin::pin};
use std::{process::ExitCode, str::FromStr};
use std::{sync::Arc, time::Duration};
use tokio::signal::ctrl_c;
use tracing_subscriber::layer;
use tun::Tun;
@@ -175,7 +175,7 @@ async fn try_main(cli: Cli, telemetry: &mut Telemetry) -> Result<()> {
(),
|| {
ExponentialBackoffBuilder::default()
.with_max_elapsed_time(None)
.with_max_elapsed_time(Some(Duration::from_secs(60 * 15)))
.build()
},
Arc::new(tcp_socket_factory),

View File

@@ -43,6 +43,10 @@ export default function Gateway() {
would not get revoked if the Gateway was disconnected from the portal
while access was removed.
</ChangeItem>
<ChangeItem pull="9894">
Shuts down the Gateway after 15m of being disconnected from the
portal.
</ChangeItem>
</Unreleased>
<Entry version="1.4.12" date={new Date("2025-06-30")}>
<ChangeItem pull="9657">