25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-26 17:38:45 +01:00

Merge pull request #283 from weiss/allow-unlimited-ack-queue

Support "max_ack_queue: infinity"
This commit is contained in:
Evgeny Khramtsov 2014-08-20 17:47:04 +04:00
commit 33e0bf1c19

View File

@ -307,6 +307,7 @@ init([{SockMod, Socket}, Opts]) ->
end,
MaxAckQueue = case proplists:get_value(max_ack_queue, Opts) of
Limit when is_integer(Limit), Limit > 0 -> Limit;
infinity -> infinity;
_ -> 500
end,
ResumeTimeout = case proplists:get_value(resume_timeout, Opts) of
@ -2789,9 +2790,7 @@ mgmt_queue_drop(StateData, NumHandled) ->
StateData#state.mgmt_queue),
StateData#state{mgmt_queue = NewQueue}.
check_queue_length(#state{mgmt_max_queue = Limit} = StateData)
when Limit == infinity;
Limit == unlimited ->
check_queue_length(#state{mgmt_max_queue = infinity} = StateData) ->
StateData;
check_queue_length(#state{mgmt_queue = Queue,
mgmt_max_queue = Limit} = StateData) ->