Fix a bug in lsm_tree:close/1.
There is a race condition based on the monitor set in a call. We might get a normal exit from the monitor message deep inside gen_server. This has to be handled. I've seen this race in my QC tests.
This commit is contained in:
parent
bb17564d9c
commit
baa779ddaa
1 changed files with 3 additions and 1 deletions
|
@ -23,7 +23,9 @@ close(Ref) ->
|
||||||
gen_server:call(Ref, close)
|
gen_server:call(Ref, close)
|
||||||
catch
|
catch
|
||||||
exit:{noproc,_} -> ok;
|
exit:{noproc,_} -> ok;
|
||||||
exit:noproc -> ok
|
exit:noproc -> ok;
|
||||||
|
%% Handle the case where the monitor triggers
|
||||||
|
exit:{normal, _} -> ok
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue