don't die if the stream hangs up on the server

This commit is contained in:
bunnie 2022-08-06 00:36:04 +08:00
parent 205f0a3be3
commit 86d9fd1aad

View file

@ -652,8 +652,8 @@ fn handle_connection(mut stream: TcpStream, boot_instant: Instant) {
contents
);
stream.write(response.as_bytes()).unwrap();
stream.flush().unwrap();
stream.write(response.as_bytes()).ok();
stream.flush().ok();
}
pub struct ThreadPool {