Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Ensure the worker supervisor terminates when you stop poolboy

  • Loading branch information...
commit 17ee86c03f8b0d4d0e93ddc40a2b6d39b29b09e8 1 parent 0deace6
@Vagabond Vagabond authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/poolboy.erl
View
3  src/poolboy.erl
@@ -148,7 +148,8 @@ handle_sync_event(get_avail_workers, _From, StateName, #state{workers=Workers}=S
handle_sync_event(get_all_workers, _From, StateName, #state{worker_sup=Sup}=State) ->
WorkerList = supervisor:which_children(Sup),
{reply, WorkerList, StateName, State};
-handle_sync_event(stop, _From, _StateName, State) ->
+handle_sync_event(stop, _From, _StateName, #state{worker_sup=Sup}=State) ->
+ exit(Sup, shutdown),
{stop, normal, ok, State};
handle_sync_event(_Event, _From, StateName, State) ->
Reply = {error, invalid_message},
Please sign in to comment.
Something went wrong with that request. Please try again.