From 39ade78b8706b43651429901ca9e078080680544 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 13 Aug 2018 15:46:17 +0200 Subject: Use message instead of call to reduce potential delays --- src/ct_helper_error_h.erl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ct_helper_error_h.erl b/src/ct_helper_error_h.erl index 149be7a..796e07a 100644 --- a/src/ct_helper_error_h.erl +++ b/src/ct_helper_error_h.erl @@ -35,7 +35,8 @@ ignore(M, F, A) -> %% Ignore crashes from Pid occuring in M:F/A. ignore(Pid, M, F, A) -> - gen_event:call(error_logger, ?MODULE, {expect, {Pid, M, F, A}}). + error_logger ! {expect, {Pid, M, F, A}}, + ok. %% gen_event. @@ -137,11 +138,11 @@ handle_event(Event = {_, GL, _}, State) when node(GL) =:= node() -> handle_event(_, State) -> {ok, State}. -handle_call({expect, Crash}, State) -> - {ok, ok, [Crash, Crash|State]}; handle_call(_, State) -> {ok, {error, bad_query}, State}. +handle_info({expect, Crash}, State) -> + {ok, [Crash, Crash|State]}; handle_info(_, State) -> {ok, State}. -- cgit v1.2.3