aboutsummaryrefslogtreecommitdiff
path: root/src/mod_stream_mgmt.erl
diff options
context:
space:
mode:
authorEvgeny Khramtsov <ekhramtsov@process-one.net>2019-08-08 11:21:28 +0300
committerEvgeny Khramtsov <ekhramtsov@process-one.net>2019-08-08 11:21:28 +0300
commitced62e0df85877341f32bd49b92b88288411c55b (patch)
tree7892cee8981c09d9f7b18a0c2b203acf8da58278 /src/mod_stream_mgmt.erl
parentRemove fast_yaml override (diff)
Don't use close/2: set stop_reason explicitly
Fixes #2984
Diffstat (limited to 'src/mod_stream_mgmt.erl')
-rw-r--r--src/mod_stream_mgmt.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mod_stream_mgmt.erl b/src/mod_stream_mgmt.erl
index 042efc249..d149438c1 100644
--- a/src/mod_stream_mgmt.erl
+++ b/src/mod_stream_mgmt.erl
@@ -239,8 +239,9 @@ c2s_handle_info(#{mgmt_ack_timer := TRef, jid := JID, mod := Mod} = State,
{timeout, TRef, ack_timeout}) ->
?DEBUG("Timed out waiting for stream management acknowledgement of ~s",
[jid:encode(JID)]),
- State1 = Mod:close(State, ack_timeout),
- {stop, transition_to_pending(State1, ack_timeout)};
+ State1 = Mod:close(State),
+ State2 = State1#{stop_reason => {socket, ack_timeout}},
+ {stop, transition_to_pending(State2, ack_timeout)};
c2s_handle_info(#{mgmt_state := pending, lang := Lang,
mgmt_pending_timer := TRef, jid := JID, mod := Mod} = State,
{timeout, TRef, pending_timeout}) ->