Skip to content

Commit

Permalink
Revert "try running accept loop in dedicated task"
Browse files Browse the repository at this point in the history
This reverts commit e205537.
  • Loading branch information
niklasf committed Dec 23, 2024
1 parent e205537 commit f0b8b6b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ mod response;
mod tablebases;

use std::{
future::IntoFuture,
net::SocketAddr,
path::PathBuf,
sync::{atomic, atomic::AtomicU64, Arc},
Expand Down Expand Up @@ -242,10 +241,7 @@ async fn serve(opt: Opt) {
None => TcpListener::bind(&opt.bind).await.expect("bind"),
};

tokio::spawn(axum::serve(listener, app).into_future())
.await
.expect("spawn")
.expect("serve");
axum::serve(listener, app).await.expect("serve");
}

fn main() {
Expand Down

0 comments on commit f0b8b6b

Please sign in to comment.