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

XEP-0198: Also count stanzas when socket is closed

Don't forget to count stanzas received from the stream management client
that are processed right after the connection was lost.
This commit is contained in:
Holger Weiss 2016-06-21 22:54:41 +02:00
parent 3a8da27d86
commit 7ddeac38b6

View File

@ -2802,7 +2802,9 @@ check_h_attribute(#state{mgmt_stanzas_out = NumStanzasOut} = StateData, H) ->
[jid:to_string(StateData#state.jid), H, NumStanzasOut]),
mgmt_queue_drop(StateData, H).
update_num_stanzas_in(#state{mgmt_state = active} = StateData, El) ->
update_num_stanzas_in(StateData, El)
when StateData#state.mgmt_state == active;
StateData#state.mgmt_state == pending ->
NewNum = case {is_stanza(El), StateData#state.mgmt_stanzas_in} of
{true, 4294967295} ->
0;