Work around for http2 hang with Or (#199)

This is a nasty hack that works around
https://github.com/hyperium/hyper/issues/2621.

Fixes https://github.com/tokio-rs/axum/issues/191
This commit is contained in:
David Pedersen
2021-08-17 19:00:24 +02:00
committed by GitHub
parent 97c140cdf7
commit 93cdfe8c5f
4 changed files with 175 additions and 5 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ async fn main() {
tracing_subscriber::fmt::init();
// build our application with a route
let app = route("/", get(handler));
let app = route("/foo", get(handler)).or(route("/bar", get(handler)));
// run it
let addr = SocketAddr::from(([127, 0, 0, 1], 3000));