Skip to content

Commit

Permalink
chore(gateway, lavalink): Update tokio-websockets to 0.11 (#2404)
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Reidel <[email protected]>
  • Loading branch information
Gelbpunkt authored Jan 4, 2025
1 parent 7c05997 commit d16782f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion twilight-gateway/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ futures-sink = { default-features = false, features = ["std"], version = "0.3" }
serde = { default-features = false, features = ["derive"], version = "1" }
serde_json = { default-features = false, features = ["std"], version = "1" }
tokio = { default-features = false, features = ["net", "rt", "sync", "time"], version = "1.19" }
tokio-websockets = { default-features = false, features = ["client", "fastrand", "sha1_smol", "simd"], version = "0.10" }
tokio-websockets = { default-features = false, features = ["client", "fastrand", "sha1_smol", "simd"], version = "0.11" }
tracing = { default-features = false, features = ["std", "attributes"], version = "0.1" }
twilight-gateway-queue = { default-features = false, path = "../twilight-gateway-queue", version = "0.16.0-rc.1" }
twilight-model = { default-features = false, path = "../twilight-model", version = "0.16.0-rc.1" }
Expand Down
2 changes: 1 addition & 1 deletion twilight-lavalink/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ http = { default-features = false, version = "1" }
serde = { default-features = false, features = ["derive", "std"], version = "1" }
serde_json = { default-features = false, features = ["std"], version = "1" }
tokio = { default-features = false, features = ["macros", "net", "rt", "sync", "time"], version = "1.0" }
tokio-websockets = { default-features = false, features = ["client", "fastrand", "sha1_smol", "simd"], version = "0.10" }
tokio-websockets = { default-features = false, features = ["client", "fastrand", "sha1_smol", "simd"], version = "0.11" }
tracing = { default-features = false, features = ["std", "attributes"], version = "0.1" }
twilight-model = { default-features = false, path = "../twilight-model", version = "0.16.0-rc.1" }

Expand Down
14 changes: 9 additions & 5 deletions twilight-lavalink/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -618,16 +618,20 @@ fn connect_request(state: &NodeConfig) -> Result<ClientBuilder, NodeError> {
source: Some(Box::new(source)),
})?
.add_header(AUTHORIZATION, state.authorization.parse().unwrap())
.expect("allowed header")
.add_header(
HeaderName::from_static("user-id"),
state.user_id.get().into(),
);
)
.expect("allowed header");

if state.resume.is_some() {
builder = builder.add_header(
HeaderName::from_static("resume-key"),
state.address.to_string().parse().unwrap(),
);
builder = builder
.add_header(
HeaderName::from_static("resume-key"),
state.address.to_string().parse().unwrap(),
)
.expect("allowed header");
}

Ok(builder)
Expand Down

0 comments on commit d16782f

Please sign in to comment.