Update protocol/library/src/client.rs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -565,14 +565,7 @@ impl GurtClient {
|
|||||||
match timeout(Duration::from_millis(400), tls_stream.read(&mut temp_buffer)).await {
|
match timeout(Duration::from_millis(400), tls_stream.read(&mut temp_buffer)).await {
|
||||||
Ok(Ok(0)) => {
|
Ok(Ok(0)) => {
|
||||||
if headers_parsed && !head_emitted {
|
if headers_parsed && !head_emitted {
|
||||||
let head = crate::message::GurtResponseHead {
|
return Err(GurtError::connection("Connection closed before response headers were fully received"));
|
||||||
version: String::new(),
|
|
||||||
status_code: 0,
|
|
||||||
status_message: String::new(),
|
|
||||||
headers: std::collections::HashMap::new(),
|
|
||||||
};
|
|
||||||
on_head(&head);
|
|
||||||
head_emitted = true;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user