refactor: use error macro
This commit is contained in:
parent
794a2f8f7e
commit
f4b4d6a02d
1 changed files with 3 additions and 4 deletions
|
@ -1,9 +1,8 @@
|
|||
use crate::{
|
||||
http::{
|
||||
error, http::{
|
||||
requests::{Request, RequestStatus, Url},
|
||||
responses::{Body, Response, UnitOrBoxedError},
|
||||
},
|
||||
threads::ThreadPool,
|
||||
}, threads::ThreadPool
|
||||
};
|
||||
use std::{
|
||||
collections::HashMap,
|
||||
|
@ -65,7 +64,7 @@ impl Handlers {
|
|||
RequestStatus::Ok(req) => req,
|
||||
RequestStatus::MalformedHTTP(stream) => {
|
||||
stream.shutdown(Shutdown::Both).unwrap_or_else(|_| {
|
||||
eprintln!("Failed to close malformed HTTP stream")
|
||||
error!("Failed to shutdown malformed HTTP stream")
|
||||
});
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue