From: William Pitcock Date: Thu, 28 Feb 2019 16:23:55 +0000 (+0000) Subject: mastodon websocket: return errors using ok, not stop X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=28b40932335e1b31a240f51740ace415ab558f43;p=akkoma mastodon websocket: return errors using ok, not stop --- diff --git a/lib/pleroma/web/mastodon_api/websocket_handler.ex b/lib/pleroma/web/mastodon_api/websocket_handler.ex index bb7ecad69..8efe2efd5 100644 --- a/lib/pleroma/web/mastodon_api/websocket_handler.ex +++ b/lib/pleroma/web/mastodon_api/websocket_handler.ex @@ -37,12 +37,12 @@ defmodule Pleroma.Web.MastodonAPI.WebsocketHandler do {:error, code} -> Logger.debug("#{__MODULE__} denied connection: #{inspect(code)} - #{inspect(req)}") {:ok, req} = :cowboy_req.reply(code, req) - {:stop, req} + {:ok, req, state} error -> Logger.debug("#{__MODULE__} denied connection: #{inspect(error)} - #{inspect(req)}") {:ok, req} = :cowboy_req.reply(400, req) - {:stop, req} + {:ok, req, state} end end