From 7d7726b0b88bb76207388b6ecf6aef7cbd9c420b Mon Sep 17 00:00:00 2001 From: Steely Wing Date: Sat, 23 Nov 2024 02:39:57 +0800 Subject: [PATCH 1/2] Fix Windows server does not full respond issue (#541) --- pueue_lib/src/network/protocol.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pueue_lib/src/network/protocol.rs b/pueue_lib/src/network/protocol.rs index 68a21c6a..a4c03166 100644 --- a/pueue_lib/src/network/protocol.rs +++ b/pueue_lib/src/network/protocol.rs @@ -56,6 +56,10 @@ pub async fn send_bytes(payload: &[u8], stream: &mut GenericStream) -> Result<() .map_err(|err| Error::IoError("sending payload chunk".to_string(), err))?; } + let _ = stream + .flush() + .await?; + Ok(()) } From 132801cb7f7af074a8d7f0e228a95be7523c5925 Mon Sep 17 00:00:00 2001 From: Steely Wing Date: Sat, 23 Nov 2024 02:52:58 +0800 Subject: [PATCH 2/2] Fix clippy --- pueue_lib/src/network/protocol.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pueue_lib/src/network/protocol.rs b/pueue_lib/src/network/protocol.rs index a4c03166..c598a192 100644 --- a/pueue_lib/src/network/protocol.rs +++ b/pueue_lib/src/network/protocol.rs @@ -56,9 +56,7 @@ pub async fn send_bytes(payload: &[u8], stream: &mut GenericStream) -> Result<() .map_err(|err| Error::IoError("sending payload chunk".to_string(), err))?; } - let _ = stream - .flush() - .await?; + stream.flush().await?; Ok(()) }