diff --git a/lib/aprsme/cluster/connection_manager.ex b/lib/aprsme/cluster/connection_manager.ex index 12771d5..f142fdc 100644 --- a/lib/aprsme/cluster/connection_manager.ex +++ b/lib/aprsme/cluster/connection_manager.ex @@ -56,6 +56,9 @@ defmodule Aprsme.Cluster.ConnectionManager do end end + @impl true + def handle_info(_msg, state), do: {:noreply, state} + @impl true def terminate(_reason, _state) do Phoenix.PubSub.unsubscribe(Aprsme.PubSub, "cluster:leadership") diff --git a/lib/aprsme_web/live/map_live/index.ex b/lib/aprsme_web/live/map_live/index.ex index 148bbad..9c19ed5 100644 --- a/lib/aprsme_web/live/map_live/index.ex +++ b/lib/aprsme_web/live/map_live/index.ex @@ -1878,6 +1878,10 @@ defmodule AprsmeWeb.MapLive.Index do # Unsubscribe from StreamingPacketsPubSub Aprsme.StreamingPacketsPubSub.unsubscribe(self()) + # Unsubscribe from Endpoint/PubSub topics subscribed in mount + Endpoint.unsubscribe("aprs_messages") + Phoenix.PubSub.unsubscribe(Aprsme.PubSub, "postgres:aprsme_packets") + if socket.assigns.buffer_timer, do: Process.cancel_timer(socket.assigns.buffer_timer) # Clean up any pending bounds update timer if socket.assigns[:bounds_update_timer] do