From: Matt Mullins Date: Sat, 4 May 2013 06:32:50 +0000 (-0700) Subject: Fix shutdown parameters for irc app supervisors. X-Git-Tag: v10~1 X-Git-Url: http://git.mmlx.us/?a=commitdiff_plain;h=e1c65e1f74fe7eb9e83bd324918d1327929ec1bd;p=erlbot.git Fix shutdown parameters for irc app supervisors. Any supervisors it launches should wait infinitely, according to the "supervisor" module docs. Since irc_conn doesn't actually do anything on terminate/2, brutally kill it. (It also doesn't trap exits, so it wouldn't get called /anyway/). --- diff --git a/irc/irc_net_sup.erl b/irc/irc_net_sup.erl index bf81d24..1d60471 100644 --- a/irc/irc_net_sup.erl +++ b/irc/irc_net_sup.erl @@ -27,7 +27,7 @@ init(Instance) -> Connection = {connection, {irc_conn, start_link, [Instance, Supervisor, TableId]}, permanent, % persistence type ("Restart" in the manual) - 5, % shutdown [sends signal, with timeout for response] + brutal_kill, % shutdown [irc_conn doesn't actually cleanup] worker, % it's not a supervisor itself [irc_conn] % modules it uses }, @@ -41,7 +41,7 @@ create_object_sup(Instance, Supervisor, TableId) -> ObjectSup = {object_sup, {irc_object_sup, start_link, [Instance, Supervisor, TableId]}, permanent, - 5, + infinity, supervisor, [irc_object_sup] }, diff --git a/irc/irc_sup.erl b/irc/irc_sup.erl index a4b4dd4..a920b2d 100644 --- a/irc/irc_sup.erl +++ b/irc/irc_sup.erl @@ -22,7 +22,7 @@ config_to_childspec({Instance, _Config}) -> {Instance, % child's name {irc_net_sup, start_link, [Instance]}, % MFA permanent, % Restart - 5, % shutdown [timeout of 5 seconds] + infinity, % shutdown [infinite timeout for supervisors, as per docs] supervisor, [irc_net_sup] }.