refactor sending into transport

This commit is contained in:
nora 2024-08-11 01:12:13 +02:00
parent caf989de97
commit 86c73b4a97
4 changed files with 101 additions and 55 deletions

View file

@ -62,7 +62,7 @@ async fn handle_connection(next: (TcpStream, SocketAddr)) -> Result<()> {
}
}
while let Some(msg) = state.next_message_to_send() {
while let Some(msg) = state.next_msg_to_send() {
conn.write_all(&msg.to_bytes())
.await
.wrap_err("writing response")?;