24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-14 22:00:16 +02:00

Fix handling of queued stanzas on session timeout

Don't fail to resend or bounce unacknowledged stanzas if the stream
management session timed out.

Closes #1160.
This commit is contained in:
Holger Weiss 2016-06-19 23:32:15 +02:00
parent 6f2b0179e7
commit c91c5aa352

View File

@ -2863,7 +2863,8 @@ check_queue_length(#state{mgmt_queue = Queue,
handle_unacked_stanzas(StateData, F) handle_unacked_stanzas(StateData, F)
when StateData#state.mgmt_state == active; when StateData#state.mgmt_state == active;
StateData#state.mgmt_state == pending -> StateData#state.mgmt_state == pending;
StateData#state.mgmt_state == timeout ->
Queue = StateData#state.mgmt_queue, Queue = StateData#state.mgmt_queue,
case queue:len(Queue) of case queue:len(Queue) of
0 -> 0 ->
@ -2885,7 +2886,8 @@ handle_unacked_stanzas(_StateData, _F) ->
handle_unacked_stanzas(StateData) handle_unacked_stanzas(StateData)
when StateData#state.mgmt_state == active; when StateData#state.mgmt_state == active;
StateData#state.mgmt_state == pending -> StateData#state.mgmt_state == pending;
StateData#state.mgmt_state == timeout ->
ResendOnTimeout = ResendOnTimeout =
case StateData#state.mgmt_resend of case StateData#state.mgmt_resend of
Resend when is_boolean(Resend) -> Resend when is_boolean(Resend) ->