From 1a1c5de9cef0e0042ca05b504fb52bfdf1e33e91 Mon Sep 17 00:00:00 2001 From: Gabriella Casap <81907469+someoneidoknow@users.noreply.github.com> Date: Fri, 26 Sep 2025 15:13:29 +0100 Subject: [PATCH] Update protocol/library/src/client.rs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- protocol/library/src/client.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/protocol/library/src/client.rs b/protocol/library/src/client.rs index ea73655..3f0875f 100644 --- a/protocol/library/src/client.rs +++ b/protocol/library/src/client.rs @@ -565,14 +565,7 @@ impl GurtClient { match timeout(Duration::from_millis(400), tls_stream.read(&mut temp_buffer)).await { Ok(Ok(0)) => { if headers_parsed && !head_emitted { - let head = crate::message::GurtResponseHead { - version: String::new(), - status_code: 0, - status_message: String::new(), - headers: std::collections::HashMap::new(), - }; - on_head(&head); - head_emitted = true; + return Err(GurtError::connection("Connection closed before response headers were fully received")); } break; }