From 6feb1056e7ed15649bc3476c9fc7e10e045021ee Mon Sep 17 00:00:00 2001 From: HoLLy Date: Mon, 16 Oct 2023 18:29:58 +0200 Subject: [PATCH] Listen on 0.0.0.0 instead of 127.0.0.1, log when starting listening --- src/server/server.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server/server.rs b/src/server/server.rs index c3325aa..af5750d 100644 --- a/src/server/server.rs +++ b/src/server/server.rs @@ -10,7 +10,8 @@ use super::{commands_request::*, commands_response::*, handler::*}; const DEFAULT_PORT: u16 = 52736; pub async fn run() -> Result<(), Box> { - let listener = TcpListener::bind(("127.0.0.1", DEFAULT_PORT)).await?; + let listener = TcpListener::bind(("0.0.0.0", DEFAULT_PORT)).await?; + info!("Listening on 0.0.0.0:{DEFAULT_PORT}"); loop { let (socket, addr) = listener.accept().await?;