diff --git a/problem_02/bin/server.rs b/problem_02/bin/server.rs index 4fa84f6..ad63d63 100644 --- a/problem_02/bin/server.rs +++ b/problem_02/bin/server.rs @@ -7,7 +7,7 @@ use tokio::signal; pub async fn main() -> problem_02::Result<()> { tracing_subscriber::fmt::try_init()?; - let listener = TcpListener::bind(&format!("127.0.0.1:{}", DEFAULT_PORT)).await?; + let listener = TcpListener::bind(&format!("0.0.0.0:{}", DEFAULT_PORT)).await?; server::run(listener, signal::ctrl_c()).await?; diff --git a/problem_02/src/connection.rs b/problem_02/src/connection.rs index d6694ba..4119651 100644 --- a/problem_02/src/connection.rs +++ b/problem_02/src/connection.rs @@ -64,7 +64,7 @@ impl Connection { pub async fn write_frame(&mut self, frame: &Frame) -> crate::Result<()> { debug!(?frame); if let Frame::Response(mean) = frame { - let _ = self.stream.write(&[mean.to_ne_bytes()[0]]); + let _ = self.stream.write(&[mean.to_ne_bytes()[0]]).await?; return Ok(()); }