From bc808ffcde9ae508886b740763c0ac8668e391b9 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Tue, 6 Mar 2018 21:03:31 +0100 Subject: [PATCH] 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. --- src/mod_stream_mgmt.erl | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.49.0