aquatic_http: fix clippy error, or at least log possible error

This commit is contained in:
Joakim Frostegård 2020-07-05 20:32:13 +02:00
parent b65297195a
commit c53c3928ab

View file

@ -108,7 +108,16 @@ impl EstablishedConnection {
response.extend_from_slice(body);
response.extend_from_slice(b"\r\n");
self.stream.write(&response)?;
let bytes_written = self.stream.write(&response)?;
if bytes_written != body.len(){
::log::error!(
"send_response: only {} out of {} bytes written",
bytes_written,
body.len()
);
}
self.stream.flush()?;
Ok(())