fix upgrade for http1.1 and 2
This commit is contained in:
parent
aa95ab9c16
commit
6d5c904f12
1 changed files with 6 additions and 4 deletions
|
|
@ -61,10 +61,12 @@ where
|
|||
self.globals.runtime_handle.clone().spawn(async move {
|
||||
tokio::time::timeout(
|
||||
self.globals.timeout + Duration::from_secs(1),
|
||||
server.serve_connection(
|
||||
server
|
||||
.serve_connection(
|
||||
stream,
|
||||
service_fn(move |req: Request<Body>| self.clone().handle_request(req, peer_addr)),
|
||||
),
|
||||
)
|
||||
.with_upgrades(),
|
||||
)
|
||||
.await
|
||||
.ok();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue