From a682392638be2059f9d998006a786d4fbecf7cde Mon Sep 17 00:00:00 2001 From: Darius Date: Thu, 9 May 2024 14:16:18 -0400 Subject: [PATCH] chore: Enable quic by default and change functions and logic --- common/src/lib.rs | 6 +++--- common/src/warp_runner/manager/mod.rs | 4 ++-- common/src/warp_runner/mod.rs | 29 +++++++++++++++------------ 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/common/src/lib.rs b/common/src/lib.rs index 5a816626579..ab0d54cd316 100644 --- a/common/src/lib.rs +++ b/common/src/lib.rs @@ -42,7 +42,7 @@ pub struct Args { #[clap(long)] discovery: Option, #[clap(long)] - enable_quic: bool, + disable_quic: bool, #[clap(long)] discovery_point: Option, #[cfg(debug_assertions)] @@ -127,7 +127,7 @@ pub struct StaticArgs { /// Disable discovery pub discovery: DiscoveryMode, /// Enable quic transport - pub enable_quic: bool, + pub disable_quic: bool, // some features aren't ready for release. This field is used to disable such features. pub production_mode: bool, } @@ -168,7 +168,7 @@ pub static STATIC_ARGS: Lazy = Lazy::new(|| { login_config_path: uplink_path.join("login_config.json"), use_mock, discovery: args.discovery.unwrap_or_default(), - enable_quic: args.enable_quic, + disable_quic: args.disable_quic, production_mode: cfg!(feature = "production_mode"), } }); diff --git a/common/src/warp_runner/manager/mod.rs b/common/src/warp_runner/manager/mod.rs index e912564e296..626731ca055 100644 --- a/common/src/warp_runner/manager/mod.rs +++ b/common/src/warp_runner/manager/mod.rs @@ -84,7 +84,7 @@ pub async fn run(mut warp: Warp, notify: Arc) { async fn get_raygun_stream(rg: &mut Messaging) -> RayGunEventStream { loop { - match rg.subscribe().await { + match rg.raygun_subscribe().await { Ok(stream) => break stream, Err(warp::error::Error::MultiPassExtensionUnavailable) | Err(warp::error::Error::RayGunExtensionUnavailable) => { @@ -100,7 +100,7 @@ async fn get_raygun_stream(rg: &mut Messaging) -> RayGunEventStream { async fn get_multipass_stream(account: &mut Account) -> MultiPassEventStream { loop { - match account.subscribe().await { + match account.multipass_subscribe().await { Ok(stream) => break stream, Err(e) => match e { //Note: Used as a precaution for future checks diff --git a/common/src/warp_runner/mod.rs b/common/src/warp_runner/mod.rs index 2ab9830d78d..75b3133b783 100644 --- a/common/src/warp_runner/mod.rs +++ b/common/src/warp_runner/mod.rs @@ -384,19 +384,22 @@ async fn warp_initialization(tesseract: Tesseract) -> Result Result