HomePhorge

Fix counters not decrementing when the process is exited

Description

Fix counters not decrementing when the process is exited

This fixes the issue by trapping exits for the duration of the fun,
then turning exit trapping off and killing the process if there is an
exit message in the mailbox.

The real-world case where this fixes things is Pleroma MediaProxy.
Without exit trapping, the process would get killed if the connection
was closed client-side and a counter would be left incremented.

I am not sure if trapping exits is the optimal solution, but I don't
see any other option.

Details

Provenance
rinpatchAuthored on Sep 4 2020, 1:54 PM
Parents
R12:55e92f84b4ed: Fix decrement after max_retries been reached + telemetry events
Branches
Unknown
Tags
Unknown

Event Timeline