mirror of
https://github.com/telemt/telemt.git
synced 2026-06-22 02:41:10 +03:00
ME Pool Health + Rotation
Co-Authored-By: brekotis <93345790+brekotis@users.noreply.github.com>
This commit is contained in:
+12
-12
@@ -391,18 +391,6 @@ async fn main() -> std::result::Result<(), Box<dyn std::error::Error>> {
|
||||
.await;
|
||||
});
|
||||
|
||||
// Periodic ME connection rotation
|
||||
let pool_clone_rot = pool.clone();
|
||||
let rng_clone_rot = rng.clone();
|
||||
tokio::spawn(async move {
|
||||
crate::transport::middle_proxy::me_rotation_task(
|
||||
pool_clone_rot,
|
||||
rng_clone_rot,
|
||||
std::time::Duration::from_secs(1800),
|
||||
)
|
||||
.await;
|
||||
});
|
||||
|
||||
Some(pool)
|
||||
}
|
||||
Err(e) => {
|
||||
@@ -712,6 +700,18 @@ async fn main() -> std::result::Result<(), Box<dyn std::error::Error>> {
|
||||
)
|
||||
.await;
|
||||
});
|
||||
|
||||
let pool_clone_rot = pool.clone();
|
||||
let rng_clone_rot = rng.clone();
|
||||
let config_rx_clone_rot = config_rx.clone();
|
||||
tokio::spawn(async move {
|
||||
crate::transport::middle_proxy::me_rotation_task(
|
||||
pool_clone_rot,
|
||||
rng_clone_rot,
|
||||
config_rx_clone_rot,
|
||||
)
|
||||
.await;
|
||||
});
|
||||
}
|
||||
|
||||
let mut listeners = Vec::new();
|
||||
|
||||
Reference in New Issue
Block a user