Skip to content

Commit

Permalink
Only handle one request on the Framed transport
Browse files Browse the repository at this point in the history
  • Loading branch information
willcrichton committed Aug 21, 2024
1 parent 705d63d commit 23af032
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/miniserve/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ pub async fn handle<'a>(
callback: &'a (impl Fn(&str) -> Option<&'a crate::ErasedHandler> + 'a),
) -> io::Result<()> {
let mut transport = Framed::new(stream, HttpCodec);
while let Some(request) = transport.next().await {
if let Some(request) = transport.next().await {
match request {
Ok(request) => {
let response = generate_response(request, callback).await;
Expand Down

0 comments on commit 23af032

Please sign in to comment.