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
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2018-02-24 23:50:54 +0300
committerHolger Weiss <holger@zedat.fu-berlin.de>2018-02-24 23:50:54 +0300
commit22e43ebd8a82c7ffe33bbc52cb619a5e4c7def92 (patch)
treecd28994356ce79a99cc7e49104fce9744204c021
parent35be7d271852804438b2f65e17bb01a417337079 (diff)
mod_stream_mgmt: Cope with exit during resumption
Don't crash if the old process exits while it is queried for the session state.
-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 76a17f049..6ca5a8b39 100644
--- a/src/mod_stream_mgmt.erl
+++ b/src/mod_stream_mgmt.erl
@@ -661,6 +661,8 @@ inherit_session_state(#{user := U, server := S,
{error, Msg}
catch exit:{noproc, _} ->
{error, <<"Previous session PID is dead">>};
+ exit:{normal, _} ->
+ {error, <<"Previous session PID has exited">>};
exit:{timeout, _} ->
{error, <<"Session state copying timed out">>}
end