From 6f6451001306e9722d4f6664d59a30a7e637e4bb Mon Sep 17 00:00:00 2001 From: CircuitSacul Date: Fri, 15 Sep 2023 13:23:15 -0400 Subject: [PATCH] use native tls for twilight-gateway --- Cargo.lock | 12 ++++-------- Cargo.toml | 2 +- src/client/runner.rs | 1 + 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 534252d3..47ee427c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2650,12 +2650,10 @@ checksum = "54319c93411147bced34cb5609a80e0a8e44c5999c93903a81cd866630ec0bfd" dependencies = [ "futures-util", "log", - "rustls", - "rustls-native-certs", + "native-tls", "tokio", - "tokio-rustls", + "tokio-native-tls", "tungstenite", - "webpki", ] [[package]] @@ -2744,13 +2742,12 @@ dependencies = [ "http", "httparse", "log", + "native-tls", "rand", - "rustls", "sha1", "thiserror", "url", "utf-8", - "webpki", ] [[package]] @@ -2762,9 +2759,8 @@ dependencies = [ "bitflags", "flate2", "futures-util", + "native-tls", "rand", - "rustls", - "rustls-native-certs", "serde", "serde_json", "tokio", diff --git a/Cargo.toml b/Cargo.toml index 08f4acef..34bd59d3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -twilight-gateway = "0.15.2" +twilight-gateway = { version = "0.15.2", default-features=false, features = [ "native", "twilight-http", "zlib-stock" ] } twilight-http = "0.15.2" twilight-model = "0.15.2" twilight-validate = "0.15.1" diff --git a/src/client/runner.rs b/src/client/runner.rs index 3cb880ca..da008c45 100644 --- a/src/client/runner.rs +++ b/src/client/runner.rs @@ -60,6 +60,7 @@ pub async fn run(bot: StarboardBot) { Ok(event) => event, Err(why) => { let fatal = why.is_fatal(); + eprintln!("{}", shard.id()); bot.handle_error(&why.into()).await; if fatal {