Skip to content

Commit

Permalink
Revert "fix: Setting the correct websocket address if TLS is enabled"
Browse files Browse the repository at this point in the history
This reverts commit 1aa6b9b.
  • Loading branch information
LinuxDevon committed Sep 3, 2024
1 parent 571355e commit 9d7ad7b
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions twilight-lavalink/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -694,18 +694,8 @@ impl Drop for Connection {
const TWILIGHT_CLIENT_NAME: &str = concat!("twilight-lavalink/", env!("CARGO_PKG_VERSION"));

fn connect_request(state: &NodeConfig) -> Result<ClientBuilder, NodeError> {
let websocket = if cfg!(any(
feature = "native-tls",
feature = "rustls-native-roots",
feature = "rustls-webpki-roots"
)) {
"wss"
} else {
"ws"
};

let mut builder = ClientBuilder::new()
.uri(&format!("{}://{}/v4/websocket", websocket, state.address))
.uri(&format!("ws://{}/v4/websocket", state.address))
.map_err(|source| NodeError {
kind: NodeErrorType::BuildingConnectionRequest,
source: Some(Box::new(source)),
Expand Down

0 comments on commit 9d7ad7b

Please sign in to comment.