Skip to content

Commit

Permalink
Add Buffer layer to outer service for efficiency
Browse files Browse the repository at this point in the history
  • Loading branch information
ekzhang committed Nov 12, 2023
1 parent 34ff2e1 commit 2de8333
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/sshx-server/src/listen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ pub(crate) async fn start_server(
}
},
);
let svc = ServiceBuilder::new().buffer(8).service(svc).boxed_clone();

let make_svc = make_service_fn(move |_| {
let svc = svc.clone();
async { Ok::<_, std::convert::Infallible>(svc) }
Expand Down

0 comments on commit 2de8333

Please sign in to comment.