Fix bytes
This commit is contained in:
parent
f4eb7213ab
commit
d84b683dd9
1 changed files with 2 additions and 2 deletions
|
|
@ -64,11 +64,11 @@ impl Connection {
|
||||||
pub async fn write_frame(&mut self, frame: &Frame) -> tokio::io::Result<()> {
|
pub async fn write_frame(&mut self, frame: &Frame) -> tokio::io::Result<()> {
|
||||||
debug!(?frame);
|
debug!(?frame);
|
||||||
if let Frame::Response(mean) = frame {
|
if let Frame::Response(mean) = frame {
|
||||||
let res = self.stream.write(&mean.to_ne_bytes()).await?;
|
let res = self.stream.write(&[mean.to_ne_bytes()[0]]).await?;
|
||||||
info!("Write frame Response to stream");
|
info!("Write frame Response to stream");
|
||||||
return self.stream.flush().await;
|
return self.stream.flush().await;
|
||||||
}
|
}
|
||||||
|
|
||||||
Err("Wrong frame".into())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue