diff options
author | Badlop <badlop@process-one.net> | 2022-11-14 17:45:41 +0100 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2022-11-14 18:45:20 +0100 |
commit | c6513fcfc668e6bbd0c604cf56df6c9742666b63 (patch) | |
tree | c3855490c5f6513fde675324779bb417ba6e848c /src | |
parent | Fix compilation warnings with Elixir 1.14 (diff) |
Handle mnesia_system_event mnesia_up when other node joins this (#3842)
Diffstat (limited to 'src')
-rw-r--r-- | src/ejabberd_s2s.erl | 3 | ||||
-rw-r--r-- | src/ejabberd_sm_mnesia.erl | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/ejabberd_s2s.erl b/src/ejabberd_s2s.erl index b2b078098..a3c8b95af 100644 --- a/src/ejabberd_s2s.erl +++ b/src/ejabberd_s2s.erl @@ -239,6 +239,9 @@ handle_cast(Msg, State) -> handle_info({mnesia_system_event, {mnesia_down, Node}}, State) -> clean_table_from_bad_node(Node), {noreply, State}; +handle_info({mnesia_system_event, {mnesia_up, Node}}, State) -> + ?INFO_MSG("Node ~p joined our Mnesia S2S tables", [Node]), + {noreply, State}; handle_info({route, Packet}, State) -> try route(Packet) catch ?EX_RULE(Class, Reason, St) -> diff --git a/src/ejabberd_sm_mnesia.erl b/src/ejabberd_sm_mnesia.erl index ec321271b..2de669436 100644 --- a/src/ejabberd_sm_mnesia.erl +++ b/src/ejabberd_sm_mnesia.erl @@ -125,6 +125,9 @@ handle_info({mnesia_system_event, {mnesia_down, Node}}, State) -> mnesia:dirty_delete_object(S) end, Sessions), {noreply, State}; +handle_info({mnesia_system_event, {mnesia_up, Node}}, State) -> + ?INFO_MSG("Node ~p joined our Mnesia SM tables", [Node]), + {noreply, State}; handle_info(Info, State) -> ?WARNING_MSG("Unexpected info: ~p", [Info]), {noreply, State}. |