瀏覽代碼

mastodon websocket: return errors using ok, not stop

tags/v1.1.4
William Pitcock 5 年之前
父節點
當前提交
28b4093233
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. +2
    -2
      lib/pleroma/web/mastodon_api/websocket_handler.ex

+ 2
- 2
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



Loading…
取消
儲存