[#161] Limited replies depth on incoming federation in order to prevent memory leaks on recursive replies fetching.

This commit is contained in:
Ivan Tashkinov 2019-06-29 20:04:50 +03:00
commit 5b7b1040b3
8 changed files with 181 additions and 84 deletions

View file

@ -22,6 +22,12 @@ defmodule Pleroma.Web.Federator do
refresh_subscriptions()
end
@max_replies_depth 100
@doc "Addresses [memory leaks on recursive replies fetching](https://git.pleroma.social/pleroma/pleroma/issues/161)"
# credo:disable-for-previous-line Credo.Check.Readability.MaxLineLength
def max_replies_depth, do: @max_replies_depth
# Client API
def incoming_doc(doc) do