From 01291f743b48be1dbfcf9ede2d4ce739eda8e98f Mon Sep 17 00:00:00 2001 From: Martin Sumner Date: Mon, 4 Mar 2019 15:56:44 +0000 Subject: [PATCH] Avoid crash.log error on shutdown Proposed https://github.com/llelf/poolboy/commit/5cf64d635343ad8d6ad99484280a87a3e95bd804 An adaptation of: https://github.com/devinus/poolboy/pull/53/files --- src/poolboy.erl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/poolboy.erl b/src/poolboy.erl index 7f44882..eb908c9 100644 --- a/src/poolboy.erl +++ b/src/poolboy.erl @@ -307,6 +307,8 @@ handle_info({'EXIT', Pid, _Reason}, StateName, State) -> handle_info(_Info, StateName, State) -> {next_state, StateName, State}. +terminate(shutdown, _StateName, #state{workers=Workers}) -> + lists:foreach(fun (W) -> unlink(W) end, queue:to_list(Workers)); terminate(_Reason, _StateName, _State) -> ok.