Skip to content

Commit

Permalink
Remove down monitor from state.
Browse files Browse the repository at this point in the history
  • Loading branch information
skeltoac committed Sep 26, 2011
1 parent 0514787 commit 61d4803
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/poolboy.erl
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ handle_sync_event(_Event, _From, StateName, State) ->
{reply, Reply, StateName, State}.

handle_info({'DOWN', Ref, _, _, _}, StateName, State) ->
case lists:keytake(Ref, 2, State#state.monitors) of
{value, {Pid, _}, _} -> dismiss_worker(Pid);
false -> false
end,
{next_state, StateName, State};
Monitors = case lists:keytake(Ref, 2, State#state.monitors) of
{value, {Pid, _}, Left} -> dismiss_worker(Pid), Left;
false -> State#state.monitors
end,
{next_state, StateName, State#state{monitors=Monitors}};
handle_info({'EXIT', Pid, _}, StateName, #state{worker_sup=Sup,
overflow=Overflow,
waiting=Waiting,
Expand Down

0 comments on commit 61d4803

Please sign in to comment.