-
Notifications
You must be signed in to change notification settings - Fork 437
fix(sendfile): Flush the out_channel used in the fallback path #8288
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
Conversation
This code is a little ugly. Because the |
af3a18b
to
36c9867
Compare
Made the code cleaner and made the diff smaller by adding an explicit |
Added a code comment explaining why the explicit flush is necessary. |
Thanks for the fix. I tweaked a little to always close with the channel api when using channels. I think that's a little safer and makes sure that all of the channel's invariants are respected. |
Nice detective work! The fix is a bit complicated but so is the problem so I'd say that's ok. I'd feel safer with a test so I added one in #8292, to merge before this PR. Thanks! |
Fixes ocaml#8284 Signed-off-by: Alan Hu <alanh@ccs.neu.edu>
I rebased and top of the fix and it's all good to me. |
@rgrinberg Did you see the review comments I left? I'm pretty sure that the exception was forgotten to be reraised. |
Nope. I didn't see them. Maybe you forgot to submit the comments? Will fix though. |
Now the buggy code was committed to main under my name. :( |
I can confirm that my installation issues are fixed when I pinned the dune package to the Git repo. |
…#8288) Fixes ocaml#8284 Signed-off-by: Alan Hu <alanh@ccs.neu.edu>
- test: add a repro for ocaml#8284 (ocaml#8292) - fix(sendfile): Flush the out_channel used in the fallback path (ocaml#8288) Signed-off-by: Alan Hu <alanh@ccs.neu.edu> Signed-off-by: Etienne Millon <me@emillon.org>
CHANGES: - Fix flushing when using `sendfile` fallback (ocaml/dune#8288, @alan-j-hu)
…#8288) Fixes ocaml#8284 Signed-off-by: Alan Hu <alanh@ccs.neu.edu>
…#8288) Fixes ocaml#8284 Signed-off-by: Alan Hu <alanh@ccs.neu.edu>
CHANGES: - Fix flushing when using `sendfile` fallback (ocaml/dune#8288, @alan-j-hu)
Fixes #8284