25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-28 16:34:13 +01:00

Unregister route at the very end

This commit is contained in:
Evgeniy Khramtsov 2016-03-13 17:37:39 +03:00
parent 5a4b7817df
commit 55c567ff00

View File

@ -877,7 +877,6 @@ handle_info(_Info, State) ->
%% @private %% @private
terminate(_Reason, terminate(_Reason,
#state{host = Host, server_host = ServerHost, nodetree = TreePlugin, plugins = Plugins}) -> #state{host = Host, server_host = ServerHost, nodetree = TreePlugin, plugins = Plugins}) ->
ejabberd_router:unregister_route(Host),
case lists:member(?PEPNODE, Plugins) of case lists:member(?PEPNODE, Plugins) of
true -> true ->
ejabberd_hooks:delete(caps_add, ServerHost, ejabberd_hooks:delete(caps_add, ServerHost,
@ -922,7 +921,8 @@ terminate(_Reason,
Pid -> Pid ->
Pid ! stop Pid ! stop
end, end,
terminate_plugins(Host, ServerHost, Plugins, TreePlugin). terminate_plugins(Host, ServerHost, Plugins, TreePlugin),
ejabberd_router:unregister_route(Host).
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------
%% Func: code_change(OldVsn, State, Extra) -> {ok, NewState} %% Func: code_change(OldVsn, State, Extra) -> {ok, NewState}