From fc1b02a54ead68e1544da3c1ba7e26650c9e90e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20H=C3=B6gberg?= Date: Fri, 4 May 2018 12:44:33 +0200 Subject: Ensure that lcnt server is terminated after lcnt:stop/0 This makes the nightly tests slightly more stable as they assert that the server isn't alive when lcnt:start/0 is called, which it could still be since the stop command was a plain gen_server call that didn't wait until the termination was completed. --- lib/tools/src/lcnt.erl | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/tools/src/lcnt.erl b/lib/tools/src/lcnt.erl index d0152a4915..1db90c1d86 100644 --- a/lib/tools/src/lcnt.erl +++ b/lib/tools/src/lcnt.erl @@ -125,7 +125,7 @@ %% -------------------------------------------------------------------- %% start() -> gen_server:start({local, ?MODULE}, ?MODULE, [], []). -stop() -> gen_server:call(?MODULE, stop, infinity). +stop() -> gen_server:stop(?MODULE, normal, infinity). init([]) -> {ok, #state{ locks = [], duration = 0 } }. start_internal() -> @@ -442,9 +442,6 @@ handle_call({save, Filename}, _From, State) -> {reply, {error, Error}, State} end; -handle_call(stop, _From, State) -> - {stop, normal, ok, State}; - handle_call(Command, _From, State) -> {reply, {error, {undefined, Command}}, State}. -- cgit v1.2.3