aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2014-04-11 10:06:23 +0200
committerDan Gudmundsson <[email protected]>2014-04-11 10:06:23 +0200
commitba6b3c236c690f478d274bfd678cb8b3cec97c52 (patch)
treee730bd68ebca3e8013489f0cced137f67013767a /lib
parentbee0ea4125e8b47478b77904bee06f8f38bbab42 (diff)
downloadotp-ba6b3c236c690f478d274bfd678cb8b3cec97c52.tar.gz
otp-ba6b3c236c690f478d274bfd678cb8b3cec97c52.tar.bz2
otp-ba6b3c236c690f478d274bfd678cb8b3cec97c52.zip
mnesia: Fix timing issue
Be sure to gather release_tid msgs even though we have a mnesia_down in the queue.
Diffstat (limited to 'lib')
-rw-r--r--lib/mnesia/src/mnesia_locker.erl9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/mnesia/src/mnesia_locker.erl b/lib/mnesia/src/mnesia_locker.erl
index 81b435c6dc..c3846b00c0 100644
--- a/lib/mnesia/src/mnesia_locker.erl
+++ b/lib/mnesia/src/mnesia_locker.erl
@@ -131,9 +131,14 @@ send_release_tid(Nodes, Tid) ->
receive_release_tid_acc([Node | Nodes], Tid) ->
receive
{?MODULE, Node, {tid_released, Tid}} ->
- receive_release_tid_acc(Nodes, Tid);
- {mnesia_down, Node} ->
receive_release_tid_acc(Nodes, Tid)
+ after 0 ->
+ receive
+ {?MODULE, Node, {tid_released, Tid}} ->
+ receive_release_tid_acc(Nodes, Tid);
+ {mnesia_down, Node} ->
+ receive_release_tid_acc(Nodes, Tid)
+ end
end;
receive_release_tid_acc([], _Tid) ->
ok.