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

surface write errors through flush #138

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

anmonteiro
Copy link
Owner

ports inhabitedtype/httpaf#217 to httpun

Co-Authored-By: David House <[email protected]>
Co-Authored-By: Doug Patti <[email protected]>
@anmonteiro anmonteiro force-pushed the anmonteiro/surface-write-errors-on-flush branch from 947293b to f3f07f1 Compare August 27, 2024 05:09
@anmonteiro
Copy link
Owner Author

this change doesn't yet do the same for the Reqd.respond_with_* class of functions, which can still raise Failure writing to a closed writer.

@anmonteiro anmonteiro merged commit cebf3ac into master Aug 27, 2024
3 checks passed
@anmonteiro anmonteiro deleted the anmonteiro/surface-write-errors-on-flush branch August 27, 2024 05:18
anmonteiro added a commit to anmonteiro/opam-repository that referenced this pull request Sep 4, 2024
CHANGES:

- client: report exceptions before closing the response body
  ([anmonteiro/httpun#135](anmonteiro/httpun#135))
- server: process requests after EOF
  ([anmonteiro/httpun#136](anmonteiro/httpun#136))
- surface (body) write errors through `flush`
  ([anmonteiro/httpun#138](anmonteiro/httpun#138))
    - `Body.Writer.flush` now takes a callback of the type
       ``([ `Written | ` Closed] -> unit)``, informing the caller whether the
       previous writes have been written or whether the output channel was
       closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant