Write to stream

This commit is contained in:
Bastian Gruber 2023-04-24 23:24:45 +02:00
parent 8ee9ded218
commit ebf41ecb05
No known key found for this signature in database
GPG key ID: BE9F8C772B188CBF

View file

@ -65,7 +65,9 @@ impl Connection {
debug!(?frame);
if let Frame::Response(mean) = frame {
let _ = self.stream.write(&[mean.to_ne_bytes()[0]]).await?;
self.stream.flush().await?
let _ = self.stream.flush().await?;
info!("Wrote frame to stream");
return Ok(());
}
Err("Wrong frame".into())