diff options
author | Marcus Arendt <[email protected]> | 2014-09-01 10:27:16 +0200 |
---|---|---|
committer | Marcus Arendt <[email protected]> | 2014-09-01 10:27:16 +0200 |
commit | 48f7c246fa044a5a995e3b8efcb10face0b2b201 (patch) | |
tree | 26a27bc8361565fbd9f94e1a5d41ed3154c0b350 /lib/mnesia/src/mnesia_controller.erl | |
parent | a8e12f7168c14cc765a63a51c838d065412795d7 (diff) | |
parent | 144f3e9c79a87f6477fdf547ce162a5d885aa201 (diff) | |
download | otp-48f7c246fa044a5a995e3b8efcb10face0b2b201.tar.gz otp-48f7c246fa044a5a995e3b8efcb10face0b2b201.tar.bz2 otp-48f7c246fa044a5a995e3b8efcb10face0b2b201.zip |
Merge branch 'maint-17' into maint
Conflicts:
OTP_VERSION
Diffstat (limited to 'lib/mnesia/src/mnesia_controller.erl')
-rw-r--r-- | lib/mnesia/src/mnesia_controller.erl | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/mnesia/src/mnesia_controller.erl b/lib/mnesia/src/mnesia_controller.erl index fe2fd67d71..5a9bae54da 100644 --- a/lib/mnesia/src/mnesia_controller.erl +++ b/lib/mnesia/src/mnesia_controller.erl @@ -300,8 +300,13 @@ mnesia_down(Node) -> end. wait_for_schema_commit_lock() -> - link(whereis(?SERVER_NAME)), - unsafe_call(wait_for_schema_commit_lock). + try + Pid = whereis(?SERVER_NAME), + link(Pid), %% Keep the link until release_schema_commit_lock + gen_server:call(Pid, wait_for_schema_commit_lock, infinity) + catch _:_ -> + mnesia:abort({node_not_running, node()}) + end. block_controller() -> call(block_controller). @@ -557,12 +562,6 @@ cast(Msg) -> abcast(Nodes, Msg) -> gen_server:abcast(Nodes, ?SERVER_NAME, Msg). -unsafe_call(Msg) -> - case whereis(?SERVER_NAME) of - undefined -> {error, {node_not_running, node()}}; - Pid -> gen_server:call(Pid, Msg, infinity) - end. - call(Msg) -> case whereis(?SERVER_NAME) of undefined -> |