Skip to content

Commit

Permalink
Prevent the thousands of warnings and sentry errors for the unhandled…
Browse files Browse the repository at this point in the history
… message (#1467)
  • Loading branch information
lawik authored Aug 25, 2024
1 parent ca2db8d commit 65a6183
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/nerves_hub_web/channels/device_channel.ex
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,11 @@ defmodule NervesHubWeb.DeviceChannel do
{:noreply, socket}
end

def handle_info(%Broadcast{event: "connection:heartbeat"}, socket) do
# Expected message that is not used here :)
{:noreply, socket}
end

def handle_info(msg, socket) do
# Ignore unhandled messages so that it doesn't crash the link process
# preventing cascading problems.
Expand Down

0 comments on commit 65a6183

Please sign in to comment.