diff options
author | John Högberg <[email protected]> | 2018-05-04 12:44:33 +0200 |
---|---|---|
committer | John Högberg <[email protected]> | 2018-05-07 08:36:44 +0200 |
commit | fc1b02a54ead68e1544da3c1ba7e26650c9e90e0 (patch) | |
tree | 01740164a9b98ff08d5ec4198e550f05f6aea09c /lib/tools | |
parent | 3b389f8e00eb734b23c6e78ff03801a5bda778f3 (diff) | |
download | otp-fc1b02a54ead68e1544da3c1ba7e26650c9e90e0.tar.gz otp-fc1b02a54ead68e1544da3c1ba7e26650c9e90e0.tar.bz2 otp-fc1b02a54ead68e1544da3c1ba7e26650c9e90e0.zip |
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.
Diffstat (limited to 'lib/tools')
-rw-r--r-- | lib/tools/src/lcnt.erl | 5 |
1 files changed, 1 insertions, 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}. |