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

Don't use close/2: set stop_reason explicitly

Fixes #2984
This commit is contained in:
Evgeny Khramtsov 2019-08-08 11:21:28 +03:00
parent 28feb90175
commit ced62e0df8

View File

@ -239,8 +239,9 @@ c2s_handle_info(#{mgmt_ack_timer := TRef, jid := JID, mod := Mod} = State,
{timeout, TRef, ack_timeout}) -> {timeout, TRef, ack_timeout}) ->
?DEBUG("Timed out waiting for stream management acknowledgement of ~s", ?DEBUG("Timed out waiting for stream management acknowledgement of ~s",
[jid:encode(JID)]), [jid:encode(JID)]),
State1 = Mod:close(State, ack_timeout), State1 = Mod:close(State),
{stop, transition_to_pending(State1, ack_timeout)}; State2 = State1#{stop_reason => {socket, ack_timeout}},
{stop, transition_to_pending(State2, ack_timeout)};
c2s_handle_info(#{mgmt_state := pending, lang := Lang, c2s_handle_info(#{mgmt_state := pending, lang := Lang,
mgmt_pending_timer := TRef, jid := JID, mod := Mod} = State, mgmt_pending_timer := TRef, jid := JID, mod := Mod} = State,
{timeout, TRef, pending_timeout}) -> {timeout, TRef, pending_timeout}) ->