Skip to content

Commit

Permalink
Merge branch 'main' into feat/rama-http-core
Browse files Browse the repository at this point in the history
  • Loading branch information
GlenDC committed Nov 6, 2024
2 parents 8d0e7c0 + 61c71e2 commit 01ed5e3
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions rama-http-backend/src/server/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -699,11 +699,12 @@ where
Response: IntoResponse + Send + 'static,
A: ToSocketAddrs,
{
TcpListener::build_with_state(state)
.bind(addr)
.await?
.serve(self.service(service))
.await;
let tcp = TcpListener::build_with_state(state).bind(addr).await?;
let service = HttpService::new(self.builder, service);
match self.guard {
Some(guard) => tcp.serve_graceful(guard, service).await,
None => tcp.serve(service).await,
};
Ok(())
}
}
Expand Down

0 comments on commit 01ed5e3

Please sign in to comment.