summaryrefslogtreecommitdiffstats
path: root/src/ct_helper_error_h.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/ct_helper_error_h.erl')
-rw-r--r--src/ct_helper_error_h.erl14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ct_helper_error_h.erl b/src/ct_helper_error_h.erl
index 7e3dc4e..d4cb69e 100644
--- a/src/ct_helper_error_h.erl
+++ b/src/ct_helper_error_h.erl
@@ -86,6 +86,20 @@ handle_event(Event = {error, GL, {emulator, _, Msg}}, State)
{ok, State}
end
end;
+%% Cowboy 2.0.
+handle_event(Event = {error, GL,
+ {_, "Ranch listener" ++ _, [_, _, _, Pid, _, [{M, F, A, _}|_]|_]}},
+ State) when node(GL) =:= node() ->
+ A2 = if is_list(A) -> length(A); true -> A end,
+ Crash = {Pid, M, F, A2},
+ case lists:member(Crash, State) of
+ true ->
+ {ok, lists:delete(Crash, State)};
+ false ->
+ write_event(Event),
+ {ok, State}
+ end;
+%% Cowboy 1.0.
handle_event(Event = {error, GL,
{_, "Ranch listener" ++ _, [_, _, _, Pid, {cowboy_handler, [_, _, _,
{stacktrace, [{M, F, A, _}|_]}|_]}]}},