Flush
This commit is contained in:
parent
7795854613
commit
8ee9ded218
2 changed files with 2 additions and 2 deletions
|
|
@ -65,7 +65,7 @@ impl Connection {
|
||||||
debug!(?frame);
|
debug!(?frame);
|
||||||
if let Frame::Response(mean) = frame {
|
if let Frame::Response(mean) = frame {
|
||||||
let _ = self.stream.write(&[mean.to_ne_bytes()[0]]).await?;
|
let _ = self.stream.write(&[mean.to_ne_bytes()[0]]).await?;
|
||||||
return Ok(());
|
self.stream.flush().await?
|
||||||
}
|
}
|
||||||
|
|
||||||
Err("Wrong frame".into())
|
Err("Wrong frame".into())
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ pub mod server;
|
||||||
mod shutdown;
|
mod shutdown;
|
||||||
use shutdown::Shutdown;
|
use shutdown::Shutdown;
|
||||||
|
|
||||||
pub const DEFAULT_PORT: u16 = 6379;
|
pub const DEFAULT_PORT: u16 = 1222;
|
||||||
|
|
||||||
pub type Error = Box<dyn std::error::Error + Send + Sync>;
|
pub type Error = Box<dyn std::error::Error + Send + Sync>;
|
||||||
pub type Result<T> = std::result::Result<T, Error>;
|
pub type Result<T> = std::result::Result<T, Error>;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue