Update protocol/library/src/client.rs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Gabriella Casap
2025-09-26 15:13:29 +01:00
committed by GitHub
parent 0859f01742
commit 1a1c5de9ce

View File

@@ -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;
}