Skip to content

Ignore SIGPIPE when serving - #429

Draft
funwithcthulhu wants to merge 1 commit into
camlworks:masterfrom
funwithcthulhu:temp/serve-ignore-sigpipe
Draft

Ignore SIGPIPE when serving#429
funwithcthulhu wants to merge 1 commit into
camlworks:masterfrom
funwithcthulhu:temp/serve-ignore-sigpipe

Conversation

@funwithcthulhu

Copy link
Copy Markdown
Contributor

Summary

  • Share the existing SIGPIPE handling between Dream.run and Dream.serve.
  • Keep the signal change at the public server entry points rather than changing response writing internals.

Fixes #378.

Validation

  • git diff --check
  • opam exec -- dune build src/http/http.ml

Blocked locally:

  • opam exec -- dune build src/dream.cma src/dream.cmxa needs graphql-lwt, which is not installed in this switch.
  • opam exec -- ocamlformat --check src/http/http.ml needs ocamlformat 0.25.1; this switch has 0.29.0.

I did not add a direct regression test here because the reported behavior depends on process-level SIGPIPE handling after a peer closes the socket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Dream.serve exit whole program when sending long string to closed connection

1 participant