Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tokio-tungstenite requirement from 0.24.0 to 0.25.0 #1666

Merged
merged 3 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ tempfile = "3.1.0"
thiserror = "2.0.3"
tokio = "1.14.0"
tokio-test = "0.4.0"
tokio-tungstenite = "0.24.0"
tokio-tungstenite = "0.26.1"
tokio-util = "0.7.0"
tower = "0.5.1"
tower-http = "0.6.1"
Expand Down
3 changes: 1 addition & 2 deletions kube-client/src/api/portforward.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,7 @@
.map_err(Error::ReceiveWebSocketMessage)?
{
match msg {
ws::Message::Binary(bin) if bin.len() > 1 => {
let mut bytes = Bytes::from(bin);
ws::Message::Binary(mut bytes) if bytes.len() > 1 => {

Check warning on line 231 in kube-client/src/api/portforward.rs

View check run for this annotation

Codecov / codecov/patch

kube-client/src/api/portforward.rs#L231

Added line #L231 was not covered by tests
let ch = bytes.split_to(1)[0];
sender
.send(Message::FromPod(ch, bytes))
Expand Down
8 changes: 4 additions & 4 deletions kube-client/src/api/remote_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@
let mut vec = Vec::with_capacity(new_size.len() + 1);
vec.push(RESIZE_CHANNEL);
vec.extend_from_slice(&new_size[..]);
server_send.send(ws::Message::Binary(vec)).await.map_err(Error::SendTerminalSize)?;
server_send.send(ws::Message::Binary(vec.into())).await.map_err(Error::SendTerminalSize)?;

Check warning on line 353 in kube-client/src/api/remote_command.rs

View check run for this annotation

Codecov / codecov/patch

kube-client/src/api/remote_command.rs#L353

Added line #L353 was not covered by tests
},
None => {
have_terminal_size_rx = false;
Expand Down Expand Up @@ -379,9 +379,9 @@
// The protocol only sends binary frames.
// Message of size 1 (only channel number) is sent on connection.
Ok(ws::Message::Binary(bin)) if bin.len() > 1 => match bin[0] {
STDOUT_CHANNEL => Some(Ok(Message::Stdout(bin))),
STDERR_CHANNEL => Some(Ok(Message::Stderr(bin))),
STATUS_CHANNEL => Some(Ok(Message::Status(bin))),
STDOUT_CHANNEL => Some(Ok(Message::Stdout(bin.into()))),
STDERR_CHANNEL => Some(Ok(Message::Stderr(bin.into()))),

Check warning on line 383 in kube-client/src/api/remote_command.rs

View check run for this annotation

Codecov / codecov/patch

kube-client/src/api/remote_command.rs#L383

Added line #L383 was not covered by tests
STATUS_CHANNEL => Some(Ok(Message::Status(bin.into()))),
// We don't receive messages to stdin and resize channels.
_ => None,
},
Expand Down
Loading