Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compio's flush is not error safe #209

Closed
Xuanwo opened this issue Feb 7, 2024 · 0 comments · Fixed by #210
Closed

compio's flush is not error safe #209

Xuanwo opened this issue Feb 7, 2024 · 0 comments · Fixed by #210
Assignees
Labels
bug Something isn't working package: io Related to compio-io
Milestone

Comments

@Xuanwo
Copy link
Collaborator

Xuanwo commented Feb 7, 2024

compio has similiar issues like tokio-rs/tokio#6325, but in the other way:

async fn flush(&mut self) -> IoResult<()> {
let Self { writer, buf } = self;
buf.with(|w| writer.write_all(w)).await?;
buf.reset();
Ok(())
}

While error happened during write, compio could write more data than expected.

@Berrysoft Berrysoft self-assigned this Feb 7, 2024
@Berrysoft Berrysoft added bug Something isn't working package: io Related to compio-io labels Feb 7, 2024
@Berrysoft Berrysoft added this to the v0.9 release milestone Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working package: io Related to compio-io
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants