diff options
author | Loïc Hoguin <[email protected]> | 2018-08-13 15:46:17 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2018-08-13 15:46:17 +0200 |
commit | 39ade78b8706b43651429901ca9e078080680544 (patch) | |
tree | 0b764535acde289397bbc1e0bcf0c33eb776c579 | |
parent | f46a504b32e23c6b3179938141b4bed5822ab604 (diff) | |
download | ct_helper-39ade78b8706b43651429901ca9e078080680544.tar.gz ct_helper-39ade78b8706b43651429901ca9e078080680544.tar.bz2 ct_helper-39ade78b8706b43651429901ca9e078080680544.zip |
Use message instead of call to reduce potential delays
-rw-r--r-- | src/ct_helper_error_h.erl | 7 |
1 files 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}. |