Send i32 over the wire

This commit is contained in:
Bastian Gruber 2023-04-24 23:54:52 +02:00
parent d84b683dd9
commit fac384c2fa
No known key found for this signature in database
GPG key ID: BE9F8C772B188CBF

View file

@ -64,7 +64,7 @@ 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()[0]]).await?; let _ = self.stream.write_i32(*mean as i32).await?;
info!("Write frame Response to stream"); info!("Write frame Response to stream");
return self.stream.flush().await; return self.stream.flush().await;
} }