From cf9598c106533c08016a9d211b58c376232b0d98 Mon Sep 17 00:00:00 2001 From: Mikhail Uvarov Date: Thu, 25 Jul 2024 14:45:36 +0200 Subject: [PATCH] Start cover using cover:start() --- src/ejabberd_app.erl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ejabberd_app.erl b/src/ejabberd_app.erl index 38ed0d26325..bcac1ad0d0c 100644 --- a/src/ejabberd_app.erl +++ b/src/ejabberd_app.erl @@ -193,12 +193,11 @@ maybe_start_cover() -> case {os:getenv("MONGOOSE_COVER_ON_START"), whereis(cover_server)} of {"true", undefined} -> error_logger:warning_msg("Starting cover. It will slowdown the system.", []), - {ok, _} = cover:start(node()), + ok = cover:local_only(), %% We need to change group leader because application:stop/1 would stop cover otherwise. %% (Application master stops every process based on group_leader). %% The killing logic is in application_master:kill_children/1 erlang:group_leader(whereis(user), whereis(cover_server)), - ok = cover:local_only(), Dir = filename:join(code:lib_dir(mongooseim), ebin), cover:compile_beam_directory(Dir); _ ->