aboutsummaryrefslogtreecommitdiff
path: root/src/mod_stream_mgmt.erl
diff options
context:
space:
mode:
authorEvgeny Khramtsov <ekhramtsov@process-one.net>2019-07-08 19:32:37 +0300
committerEvgeny Khramtsov <ekhramtsov@process-one.net>2019-07-08 19:32:37 +0300
commit0545e0a797c32ce7292917bb1597a4332dacb3bf (patch)
treebee6fb9cb00c4a5eb56ded1ee625a268753b2401 /src/mod_stream_mgmt.erl
parentAvoid crashing of ejabberd_iq process on invalid callback (diff)
Ignore late arrival of an already cancelled timer
Diffstat (limited to 'src/mod_stream_mgmt.erl')
-rw-r--r--src/mod_stream_mgmt.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mod_stream_mgmt.erl b/src/mod_stream_mgmt.erl
index 1ebff130c..030a36b80 100644
--- a/src/mod_stream_mgmt.erl
+++ b/src/mod_stream_mgmt.erl
@@ -257,6 +257,12 @@ c2s_handle_info(#{jid := JID} = State, {_Ref, {resume, OldState}}) ->
[jid:encode(JID)]),
route_unacked_stanzas(OldState#{mgmt_resend => false}),
{stop, State};
+c2s_handle_info(State, {timeout, _, Timeout}) when Timeout == ack_timeout;
+ Timeout == pending_timeout ->
+ %% Late arrival of an already cancelled timer: we just ignore it.
+ %% This might happen because misc:cancel_timer/1 doesn't guarantee
+ %% timer cancelation in the case when p1_server is used.
+ {stop, State};
c2s_handle_info(State, _) ->
State.