Use {shutdown, Error} when terminating connection processes

Previously they exited `normal`, which helped avoid error log spam. However,
that also meant any linked helper processes would not exit when the main
connection process had been terminated.

To automatically clean up any linked processes, and continue avoiding
generating error logs, we can use `{shutdown, Error}` as the exit reason. That
error, along with `shutdown` atom, are special exit reasons which are
considered `normal` for proc_lib processes and will not generate error logs
[1].

Another benefit is having more specific exit reasons (send error, recv error,
etc.), which may help with debugging.

[1] https://www.erlang.org/docs/24/man/proc_lib.html#description
5 files changed
tree: 6c4ab4212e847af5468f2c00fa17c96026fa5775
  1. .github/
  2. examples/
  3. include/
  4. scripts/
  5. src/
  6. support/
  7. test/
  8. .editorconfig
  9. .gitignore
  10. .travis.yml
  11. CHANGES.md
  12. LICENSE
  13. Makefile
  14. README.md
  15. rebar
  16. rebar.config
README.md

MochiWeb is an Erlang library for building lightweight HTTP servers.

The latest version of MochiWeb is available at https://github.com/mochi/mochiweb

The mailing list for MochiWeb is at https://groups.google.com/group/mochiweb/

Erlang OTP is required for setting up the MochiWeb environment and is available at https://www.erlang.org/

To create a new mochiweb using project: make app PROJECT=project_name

To create a new mochiweb using project in a specific directory: make app PROJECT=project_name PREFIX=$HOME/projects/

Information about Rebar (Erlang build tool) is available at https://github.com/rebar/rebar

MochiWeb is currently tested with Erlang/OTP 18.3 through 24.0, but may still be compatible back to R15B-03.

OTP 21.2, 21.2.1, 21.2.2 warning

OTP 21.2 (up to and including 21.2.2) introduced an SSL regression that makes these releases unsafe to use. See ERL-830. This issue was resolved in OTP 21.2.3.