From: rinpatch Date: Thu, 10 Sep 2020 10:47:53 +0000 (+0300) Subject: websocket handler: Do not log client ping frames as errors X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=cb06e98da27994ac8034f3ba387b6eeaf8a2c48f;p=akkoma websocket handler: Do not log client ping frames as errors --- diff --git a/lib/pleroma/web/mastodon_api/websocket_handler.ex b/lib/pleroma/web/mastodon_api/websocket_handler.ex index 94e4595d8..e6010bb4a 100644 --- a/lib/pleroma/web/mastodon_api/websocket_handler.ex +++ b/lib/pleroma/web/mastodon_api/websocket_handler.ex @@ -64,7 +64,9 @@ defmodule Pleroma.Web.MastodonAPI.WebsocketHandler do {:ok, %{state | timer: timer()}} end - # We never receive messages. + # We only receive pings for now + def websocket_handle(:ping, state), do: {:ok, state} + def websocket_handle(frame, state) do Logger.error("#{__MODULE__} received frame: #{inspect(frame)}") {:ok, state}