Updated hyper to 1.0.0-rc.4

This commit is contained in:
Fayeed Pawaskar
2023-08-08 16:20:49 +05:30
parent cf63b588bc
commit 72ceceb7ae
4 changed files with 101 additions and 38 deletions

View File

@@ -88,6 +88,7 @@ use hyper::{HeaderMap, Method};
use http_body_util::BodyExt;
use bytes::Buf;
use reqwest::Url;
use hyper_util::rt::TokioIo;
pub(crate) fn get_key() -> KeyEvent {
let key;
@@ -4349,14 +4350,16 @@ impl Machine {
let (stream, _) = listener.accept().await.unwrap();
tokio::task::spawn(async move {
if let Err(err) = http1::Builder::new()
.serve_connection(stream, HttpService {
tx
})
.await
{
eprintln!("Error serving connection: {:?}", err);
}
let io = TokioIo::new(stream);
if let Err(err) = http1::Builder::new()
.serve_connection(io, HttpService {
tx
})
.await
{
eprintln!("Error serving connection: {:?}", err);
}
});
}
});