aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_http.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-03-13 10:40:14 +0100
committerLoïc Hoguin <[email protected]>2018-03-13 10:40:14 +0100
commitb9c8d86502a76cf3a72af30fc6aa0fc88ca7afff (patch)
treec4904971099917551801c26f22b6283c869e4937 /src/cowboy_http.erl
parenta89732e8e0fac2b2265007a11c05d4d0f6e6b1b0 (diff)
downloadcowboy-b9c8d86502a76cf3a72af30fc6aa0fc88ca7afff.tar.gz
cowboy-b9c8d86502a76cf3a72af30fc6aa0fc88ca7afff.tar.bz2
cowboy-b9c8d86502a76cf3a72af30fc6aa0fc88ca7afff.zip
Handle supervisor calls properly everywhere
Diffstat (limited to 'src/cowboy_http.erl')
-rw-r--r--src/cowboy_http.erl10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/cowboy_http.erl b/src/cowboy_http.erl
index fa09480..62e5176 100644
--- a/src/cowboy_http.erl
+++ b/src/cowboy_http.erl
@@ -202,14 +202,8 @@ loop(State=#state{parent=Parent, socket=Socket, transport=Transport, opts=Opts,
Msg = {'EXIT', Pid, _} ->
loop(down(State, Pid, Msg), Buffer);
%% Calls from supervisor module.
- {'$gen_call', {From, Tag}, which_children} ->
- From ! {Tag, cowboy_children:which_children(Children, ?MODULE)},
- loop(State, Buffer);
- {'$gen_call', {From, Tag}, count_children} ->
- From ! {Tag, cowboy_children:count_children(Children)},
- loop(State, Buffer);
- {'$gen_call', {From, Tag}, _} ->
- From ! {Tag, {error, ?MODULE}},
+ {'$gen_call', From, Call} ->
+ cowboy_children:handle_supervisor_call(Call, From, Children, ?MODULE),
loop(State, Buffer);
%% Unknown messages.
Msg ->