Skip to content

Commit

Permalink
fix: don't restart the crashed worker process if auto_reconnect=false
Browse files Browse the repository at this point in the history
  • Loading branch information
HJianBo committed Jul 14, 2023
1 parent 8cd58f1 commit fe91566
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/ecpool.appup.src
@@ -1,6 +1,9 @@
%% -*-: erlang -*-
{"0.5.2",
{"0.5.3",
[
{"0.5.2", [
{load_module, ecpool_worker, brutal_purge, soft_purge, []}
]},
{"0.5.1", [
{load_module, ecpool_worker, brutal_purge, soft_purge, []},
{load_module, ecpool_sup, brutal_purge, soft_purge, []}
Expand All @@ -18,6 +21,9 @@
]}
],
[
{"0.5.2", [
{load_module, ecpool_worker, brutal_purge, soft_purge, []}
]},
{"0.5.1", [
{load_module, ecpool_worker, brutal_purge, soft_purge, []},
{load_module, ecpool_sup, brutal_purge, soft_purge, []}
Expand Down
2 changes: 1 addition & 1 deletion src/ecpool_worker.erl
Expand Up @@ -176,7 +176,7 @@ handle_info({'EXIT', Pid, Reason}, State = #state{opts = Opts, supervisees = Sup
case lists:member(Pid, SupPids) of
true ->
case proplists:get_value(auto_reconnect, Opts, false) of
false -> {stop, Reason, State};
false -> {stop, {shutdown, Reason}, State};
Secs -> reconnect(Secs, State)
end;
false ->
Expand Down

0 comments on commit fe91566

Please sign in to comment.