RoomChannel and the README use trap_exit ``` Process.flag(:trap_exit, true) ``` https://github.com/chrismccord/phoenix_chat_example/blob/master/web/channels/room_channel.ex#L16 From the Phoenix documentation: > Similar to GenServer, it would also be possible :trap_exit to guarantee that terminate/2 is invoked. This practice is not encouraged though. So what should this code be doing instead?
RoomChannel and the README use trap_exit
https://github.com/chrismccord/phoenix_chat_example/blob/master/web/channels/room_channel.ex#L16
From the Phoenix documentation:
So what should this code be doing instead?