From: Holger Weiss Date: Tue, 6 Mar 2018 20:03:31 +0000 (+0100) Subject: mod_stream_mgmt: Clean up on timed out resumption X-Git-Tag: 18.03~32 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bc808ffcde9ae508886b740763c0ac8668e391b9;p=ejabberd 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. --- 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;