From ae90df49c13149d10484c35a9fdcc4ac1796a8cf Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Thu, 10 Aug 2023 23:19:47 -0500 Subject: [PATCH] ipv6 --- src/main.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index 3e68062..5cad5a6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -84,16 +84,12 @@ async fn main() -> Result<()> { let service = app.into_make_service(); - let addr4 = SocketAddr::from((Ipv4Addr::UNSPECIFIED, opts.port)); let addr6 = SocketAddr::from((Ipv6Addr::UNSPECIFIED, opts.port)); - println!("Listening on {} and {}...", addr4, addr6); + println!("Listening on {}...", addr6); - let server4 = Server::bind(&addr4).serve(service.clone()); let server6 = Server::bind(&addr6).serve(service); - let (result4, result6) = join!(server4, server6); - result4?; - result6?; + server6.await?; Ok(()) }