diff options
Diffstat (limited to 'lib/common_test/src/ct_hooks_lock.erl')
-rw-r--r-- | lib/common_test/src/ct_hooks_lock.erl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/common_test/src/ct_hooks_lock.erl b/lib/common_test/src/ct_hooks_lock.erl index be50a33e01..ebae37bc82 100644 --- a/lib/common_test/src/ct_hooks_lock.erl +++ b/lib/common_test/src/ct_hooks_lock.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2004-2018. All Rights Reserved. +%% Copyright Ericsson AB 2004-2022. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -109,7 +109,11 @@ handle_info({'DOWN',Ref,process,Pid,_}, gen_server:reply(NextFrom, locked), NextRef = monitor(process, NextPid), {noreply,State#state{ locked = {true, NextPid, NextRef}, - requests = Rest } }. + requests = Rest } }; +handle_info({'DOWN',Ref,process,Pid,_}, + #state{ locked = {true, Pid, Ref}, + requests = [] } = State) -> + {noreply, State#state{ locked = false } }. terminate(_Reason, _State) -> ok. |