trap_exists and cowboy ws

Loïc Hoguin essen@REDACTED
Fri Jul 16 12:10:43 CEST 2021


It's expected because connection processes also act as supervisors, but 
there's no reason it should trap exits once the connection has switched 
to Websocket. Please open a ticket or PR to make the connection switch 
back to NOT trapping exits when switching to Websocket.


On 14/07/2021 16:30, Roberto Ostinelli wrote:
> All,
> I'm experiencing a situation where a process spawned after a cowboy 
> websocket handler upgrade request in init/2 has the process flag 
> trap_exit set to true, without me doing anything to set it.
> This happens in Elixir, not sure if this is related.
> def websocket_init(_state) do
>"was trapping? #{Process.flag(:trap_exit, true)}")
> => this prints "was trapping? true"
> Is this expected behaviour?
> Thank you,
> r.

Loïc Hoguin

More information about the erlang-questions mailing list