]> granicus.if.org Git - ejabberd/commitdiff
mod_stream_mgmt: Cope with exit during resumption
authorHolger Weiss <holger@zedat.fu-berlin.de>
Sat, 24 Feb 2018 20:50:54 +0000 (21:50 +0100)
committerHolger Weiss <holger@zedat.fu-berlin.de>
Sat, 24 Feb 2018 20:50:54 +0000 (21:50 +0100)
Don't crash if the old process exits while it is queried for the session
state.

src/mod_stream_mgmt.erl

index 76a17f0495c39aeb3ac31cfaf8de9b17067ca092..6ca5a8b397ec0ae108c8331ea421ec17d127459e 100644 (file)
@@ -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