25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +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
terminate(_Reason,
#state{host = Host, server_host = ServerHost, nodetree = TreePlugin, plugins = Plugins}) ->
ejabberd_router:unregister_route(Host),
case lists:member(?PEPNODE, Plugins) of
true ->
ejabberd_hooks:delete(caps_add, ServerHost,
@ -922,7 +921,8 @@ terminate(_Reason,
Pid ->
Pid ! stop
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}