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.