Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2018-03-06 23:03:31 +0300
committerHolger Weiss <holger@zedat.fu-berlin.de>2018-03-06 23:03:31 +0300
commitbc808ffcde9ae508886b740763c0ac8668e391b9 (patch)
treebdb451195a4e5879c2bbd5bb8d1b8f51777860b5 /src
parentd9bf5a68657305e4fe2b31629a5621b8700ac064 (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;