mastodon websocket: return errors using ok, not stop

This commit is contained in:
William Pitcock 2019-02-28 16:23:55 +00:00
parent 388a3f4ca2
commit 28b4093233

View file

@ -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