From 3e7c42090bd75e84883ac24b3c35f44f9223e987 Mon Sep 17 00:00:00 2001 From: Nelson Vides Date: Tue, 15 Mar 2022 18:12:19 +0100 Subject: [PATCH] Reconfigure supervision flags in pools Children of type `supervisor` should not have a shutdown flag other than `infinity` according to the official documentation. --- src/wpool/mongoose_wpool_mgr.erl | 1 - src/wpool/mongoose_wpool_sup.erl | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/wpool/mongoose_wpool_mgr.erl b/src/wpool/mongoose_wpool_mgr.erl index 948d6ec4ae..14f7ddb25a 100644 --- a/src/wpool/mongoose_wpool_mgr.erl +++ b/src/wpool/mongoose_wpool_mgr.erl @@ -38,7 +38,6 @@ -ignore_xref([start_link/1]). --include("mongoose.hrl"). -include("mongoose_logger.hrl"). -record(state, {type, pools, monitors}). diff --git a/src/wpool/mongoose_wpool_sup.erl b/src/wpool/mongoose_wpool_sup.erl index d87eec4b30..587149134e 100644 --- a/src/wpool/mongoose_wpool_sup.erl +++ b/src/wpool/mongoose_wpool_sup.erl @@ -72,14 +72,14 @@ init([]) -> #{id := mongoose_wpool:proc_name(), start := {mongoose_wpool_type_sup, start_link, [mongoose_wpool:pool_type()]}, restart => transient, - shutdown => brutal_kill, + shutdown => infinity, type => supervisor, modules => [module()]}. child_spec(Type) -> #{id => mongoose_wpool_type_sup:name(Type), start => {mongoose_wpool_type_sup, start_link, [Type]}, restart => transient, - shutdown => brutal_kill, + shutdown => infinity, type => supervisor, modules => [mongoose_wpool_type_sup] }.