aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2018-03-06 21:03:31 +0100
committerHolger Weiss <holger@zedat.fu-berlin.de>2018-03-06 21:03:31 +0100
commitbc808ffcde9ae508886b740763c0ac8668e391b9 (patch)
treebdb451195a4e5879c2bbd5bb8d1b8f51777860b5 /src
parentDon't forget to remove mgmt_force_enqueue flag (diff)
mod_stream_mgmt: Clean up on timed out resumption
During resumption, make sure the old process and the corresponding session entry are disposed also in the case where the call that queries the old process times out.
Diffstat (limited to 'src')
-rw-r--r--src/mod_stream_mgmt.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mod_stream_mgmt.erl b/src/mod_stream_mgmt.erl
index 0682762b4..a8aeaaef0 100644
--- a/src/mod_stream_mgmt.erl
+++ b/src/mod_stream_mgmt.erl
@@ -664,6 +664,8 @@ inherit_session_state(#{user := U, server := S,
exit:{normal, _} ->
{error, <<"Previous session PID has exited">>};
exit:{timeout, _} ->
+ ejabberd_sm:close_session(OldSID, U, S, R),
+ ejabberd_c2s:stop(OldPID),
{error, <<"Session state copying timed out">>}
end
end;