From 8ee9ded218e7af275aefc5f60fb98f8bf3694f31 Mon Sep 17 00:00:00 2001 From: Bastian Gruber Date: Mon, 24 Apr 2023 23:04:13 +0200 Subject: [PATCH] Flush --- problem_02/src/connection.rs | 2 +- problem_02/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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;