Skip to content

Commit

Permalink
add flush
Browse files Browse the repository at this point in the history
  • Loading branch information
hoping committed Jul 22, 2024
1 parent 4051edf commit 9d26e6b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ smoltcp = { version = "0.11" }
backtrace = "0.3"
hex = "0.4"
surge-ping = "0.8"
tokio = { version = "1.36", features = ["full"] }
tokio = { version = "1.38", features = ["full"] }
rand = "0.8"
test-log = "0.2"
notify = "6.1"
Expand Down
4 changes: 4 additions & 0 deletions src/async_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ pub async fn copy<R: AsyncReadExt + Unpin, W: AsyncWriteExt + Unpin>(
)
.await
{
if let Err(err) = write.flush().await {
log::error!("{} flush failed:{}", message, err);
break;
}
continue;
} else {
log::error!("{} write failed", message);
Expand Down

0 comments on commit 9d26e6b

Please sign in to comment.