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

Allow for "max_ack_queue: infinity", as documented

This commit is contained in:
Holger Weiss 2014-08-20 12:53:26 +02:00
parent ae0d31a8c9
commit 2802b6cee2

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