aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_stream_h.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-08-10 17:45:28 +0200
committerLoïc Hoguin <[email protected]>2016-08-10 17:45:28 +0200
commit9966df9ad4ddf74111d8cbffb6658497319a89b4 (patch)
treefdf6385e2f53465e2c6e9d2aef7d13e53301ed68 /src/cowboy_stream_h.erl
parente30d120bd8c9a4a7b469937d5b5be6a8dfe148d4 (diff)
downloadcowboy-9966df9ad4ddf74111d8cbffb6658497319a89b4.tar.gz
cowboy-9966df9ad4ddf74111d8cbffb6658497319a89b4.tar.bz2
cowboy-9966df9ad4ddf74111d8cbffb6658497319a89b4.zip
Let the stream handler take care of crash handling and logging
Diffstat (limited to 'src/cowboy_stream_h.erl')
-rw-r--r--src/cowboy_stream_h.erl12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/cowboy_stream_h.erl b/src/cowboy_stream_h.erl
index 92be76d..a7ce721 100644
--- a/src/cowboy_stream_h.erl
+++ b/src/cowboy_stream_h.erl
@@ -69,18 +69,6 @@ data(_StreamID, IsFin, Data, State=#state{pid=Pid, read_body_ref=Ref,
-spec info(_,_,_) -> _.
info(_StreamID, {'EXIT', Pid, normal}, State=#state{pid=Pid}) ->
{[stop], State};
-%% @todo Transition.
-%% In the future it would be better to simplify things
-%% and only catch this at the stream level.
-%%
-%% Maybe we don't need specific error messages
-%% for every single callbacks anymore?
-info(_StreamID, Exit = {'EXIT', Pid, {cowboy_handler, _}}, State=#state{pid=Pid}) ->
- %% No crash report; one has already been sent.
- {[
- {error_response, 500, #{<<"content-length">> => <<"0">>}, <<>>},
- {internal_error, Exit, 'Stream process crashed.'}
- ], State};
info(_StreamID, {'EXIT', Pid, {_Reason, [_, {cow_http_hd, _, _, _}|_]}}, State=#state{pid=Pid}) ->
%% @todo Have an option to enable/disable this specific crash report?
%%report_crash(Ref, StreamID, Pid, Reason, Stacktrace),