net/message: Always flush on send_packet()

This commit is contained in:
parazyd
2023-07-10 11:11:48 +02:00
parent eb6934bc2f
commit b76d2e57b5
2 changed files with 3 additions and 1 deletions

View File

@@ -255,7 +255,7 @@ impl Channel {
);
let stream = &mut *self.writer.lock().await;
let _written = message::send_packet(stream, packet).await?;
let _ = message::send_packet(stream, packet).await?;
Ok(())
}

View File

@@ -155,5 +155,7 @@ pub async fn send_packet<W: AsyncWrite + Unpin + Sized>(
written += packet.payload.len();
debug!(target: "net::message", "Sent payload {} bytes", packet.payload.len() as u64);
stream.flush().await?;
Ok(written)
}