Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Ensure the worker supervisor terminates when you stop poolboy

  • Loading branch information...
commit 17ee86c03f8b0d4d0e93ddc40a2b6d39b29b09e8 1 parent 0deace6
Andrew Thompson Vagabond authored

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. +2 1  src/poolboy.erl
3  src/poolboy.erl
@@ -148,7 +148,8 @@ handle_sync_event(get_avail_workers, _From, StateName, #state{workers=Workers}=S
148 148 handle_sync_event(get_all_workers, _From, StateName, #state{worker_sup=Sup}=State) ->
149 149 WorkerList = supervisor:which_children(Sup),
150 150 {reply, WorkerList, StateName, State};
151   -handle_sync_event(stop, _From, _StateName, State) ->
  151 +handle_sync_event(stop, _From, _StateName, #state{worker_sup=Sup}=State) ->
  152 + exit(Sup, shutdown),
152 153 {stop, normal, ok, State};
153 154 handle_sync_event(_Event, _From, StateName, State) ->
154 155 Reply = {error, invalid_message},

0 comments on commit 17ee86c

Please sign in to comment.
Something went wrong with that request. Please try again.