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:
commit
33e0bf1c19
@ -307,6 +307,7 @@ init([{SockMod, Socket}, Opts]) ->
|
|||||||
end,
|
end,
|
||||||
MaxAckQueue = case proplists:get_value(max_ack_queue, Opts) of
|
MaxAckQueue = case proplists:get_value(max_ack_queue, Opts) of
|
||||||
Limit when is_integer(Limit), Limit > 0 -> Limit;
|
Limit when is_integer(Limit), Limit > 0 -> Limit;
|
||||||
|
infinity -> infinity;
|
||||||
_ -> 500
|
_ -> 500
|
||||||
end,
|
end,
|
||||||
ResumeTimeout = case proplists:get_value(resume_timeout, Opts) of
|
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),
|
||||||
StateData#state{mgmt_queue = NewQueue}.
|
StateData#state{mgmt_queue = NewQueue}.
|
||||||
|
|
||||||
check_queue_length(#state{mgmt_max_queue = Limit} = StateData)
|
check_queue_length(#state{mgmt_max_queue = infinity} = StateData) ->
|
||||||
when Limit == infinity;
|
|
||||||
Limit == unlimited ->
|
|
||||||
StateData;
|
StateData;
|
||||||
check_queue_length(#state{mgmt_queue = Queue,
|
check_queue_length(#state{mgmt_queue = Queue,
|
||||||
mgmt_max_queue = Limit} = StateData) ->
|
mgmt_max_queue = Limit} = StateData) ->
|
||||||
|
Loading…
Reference in New Issue
Block a user