aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2020-09-10 13:47:53 +0300
committerrinpatch <rinpatch@sdf.org>2020-09-10 21:14:23 +0300
commitcb06e98da27994ac8034f3ba387b6eeaf8a2c48f (patch)
tree0b5283a7b6e92db1698ec32403697e07c9c1f66c
parent9d20d29a79f4ea0756f4e2c7f387674f57513b6d (diff)
downloadpleroma-cb06e98da27994ac8034f3ba387b6eeaf8a2c48f.tar.gz
websocket handler: Do not log client ping frames as errors
-rw-r--r--lib/pleroma/web/mastodon_api/websocket_handler.ex4
1 files changed, 3 insertions, 1 deletions
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}