diff --git a/problem_02/src/connection.rs b/problem_02/src/connection.rs index 4119651..418c163 100644 --- a/problem_02/src/connection.rs +++ b/problem_02/src/connection.rs @@ -65,7 +65,7 @@ impl Connection { debug!(?frame); if let Frame::Response(mean) = frame { let _ = self.stream.write(&[mean.to_ne_bytes()[0]]).await?; - return Ok(()); + self.stream.flush().await? } Err("Wrong frame".into()) diff --git a/problem_02/src/lib.rs b/problem_02/src/lib.rs index 82f0795..5252f1a 100644 --- a/problem_02/src/lib.rs +++ b/problem_02/src/lib.rs @@ -9,7 +9,7 @@ pub mod server; mod shutdown; use shutdown::Shutdown; -pub const DEFAULT_PORT: u16 = 6379; +pub const DEFAULT_PORT: u16 = 1222; pub type Error = Box; pub type Result = std::result::Result;