Getting message for disconnection of client or Phoenix server

There’s interesting discussions about this:


I saw a snippet in auto generated auth code: DerpyCoderWeb.Endpoint.broadcast(live_socket_id, “disconnect”, %{})

That broadcasts disconnect event on logout.

So I was thinking that same event gets fired for socket disconnect, which we can handle.

And of course we have to lower the heartbeat interval, so we can detect when client disconnects quickly.