Re: trap_exists and cowboy ws
Loïc Hoguin <[email protected]>
| Newsgroups | gmane.comp.lang.erlang.general |
|---|---|
| Organization | Nine Nines |
| Message-ID | <[email protected]> |
Hey,
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.
Cheers,
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
> Logger.info("was trapping? #{Process.flag(:trap_exit, true)}")
>
> => this prints "was trapping? true"
>
> Is this expected behaviour?
>
> Thank you,
> r.
--
Loïc Hoguin
https://ninenines.eu