mirror of
https://github.com/telemt/telemt.git
synced 2026-09-24 03:25:58 +03:00
Rustfmt
This commit is contained in:
@@ -10,11 +10,11 @@ use tokio_util::task::TaskTracker;
|
||||
use crate::config::ProxyConfig;
|
||||
use crate::crypto::SecureRandom;
|
||||
use crate::ip_tracker::UserIpTracker;
|
||||
use crate::proxy::authenticated::ClientRuntimeDeps;
|
||||
#[cfg(test)]
|
||||
use crate::proxy::route_mode::RelayRouteMode;
|
||||
use crate::proxy::route_mode::RouteRuntimeController;
|
||||
use crate::proxy::shared_state::ProxySharedState;
|
||||
use crate::proxy::authenticated::ClientRuntimeDeps;
|
||||
use crate::stats::beobachten::BeobachtenStore;
|
||||
use crate::stats::{ReplayChecker, Stats};
|
||||
use crate::stream::BufferPool;
|
||||
|
||||
@@ -301,12 +301,7 @@ impl ListenerSlot {
|
||||
);
|
||||
tokio::time::timeout(connection_stop_timeout, self.connections.wait())
|
||||
.await
|
||||
.map_err(|_| {
|
||||
format!(
|
||||
"listener {} connection shutdown timed out",
|
||||
self.spec.addr
|
||||
)
|
||||
})?;
|
||||
.map_err(|_| format!("listener {} connection shutdown timed out", self.spec.addr))?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
@@ -4,16 +4,16 @@ use std::sync::Arc;
|
||||
|
||||
use arc_swap::ArcSwap;
|
||||
|
||||
use crate::config::ProxyConfig;
|
||||
use crate::config::ListenerTransport;
|
||||
use crate::config::ProxyConfig;
|
||||
use crate::maestro::generation::RuntimeGeneration;
|
||||
|
||||
use super::accept::ListenerSlot;
|
||||
use super::bind::{BoundListeners, BoundTcpListener, PreparedTcpListener, prepare_listener};
|
||||
use super::plan::{ListenerBindSpec, listener_bind_plan};
|
||||
use crate::web::manager::WebProcessRuntime;
|
||||
#[cfg(unix)]
|
||||
use super::unix::UnixAcceptHandle;
|
||||
use crate::web::manager::WebProcessRuntime;
|
||||
|
||||
/// Process-owned listener inventory and accept-task lifecycle controller.
|
||||
pub(crate) struct ListenerManager {
|
||||
@@ -54,11 +54,7 @@ impl ListenerManager {
|
||||
let addr = listener.spec.addr;
|
||||
slots.insert(
|
||||
addr,
|
||||
ListenerSlot::start(
|
||||
listener,
|
||||
active_runtime.clone(),
|
||||
web_runtime.clone(),
|
||||
),
|
||||
ListenerSlot::start(listener, active_runtime.clone(), web_runtime.clone()),
|
||||
);
|
||||
}
|
||||
#[cfg(unix)]
|
||||
@@ -103,7 +99,9 @@ impl ListenerManager {
|
||||
.map(|(addr, spec)| (*addr, spec.clone()))
|
||||
.collect::<BTreeMap<_, _>>();
|
||||
if web_inventory_changed {
|
||||
return Err("WEB listener inventory is process-owned; process restart required".to_string());
|
||||
return Err(
|
||||
"WEB listener inventory is process-owned; process restart required".to_string(),
|
||||
);
|
||||
}
|
||||
let current_addresses: BTreeSet<_> = self.slots.keys().copied().collect();
|
||||
let target_addresses: BTreeSet<_> = target_specs.keys().copied().collect();
|
||||
|
||||
@@ -406,8 +406,7 @@ pub(crate) fn resolve_reload_config(
|
||||
fields.push("logging".to_string());
|
||||
effective.logging = old.logging.clone();
|
||||
}
|
||||
if serde_json::to_value(&old.web.limits).ok()
|
||||
!= serde_json::to_value(&desired.web.limits).ok()
|
||||
if serde_json::to_value(&old.web.limits).ok() != serde_json::to_value(&desired.web.limits).ok()
|
||||
{
|
||||
fields.push("web.limits".to_string());
|
||||
effective.web.limits = old.web.limits.clone();
|
||||
|
||||
Reference in New Issue
Block a user