diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2011-07-18 15:07:18 +0100 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2011-07-18 15:07:18 +0100 |
| commit | 8b6acb113c5a50a1f5a2deab59db816d6568eeff (patch) | |
| tree | 40f08921ab1c018c4936ee277d6eb4612c0160e2 | |
| parent | ba884ae7dae2422d86b4cc542f2d31190d922a3a (diff) | |
| download | rabbitmq-server-git-8b6acb113c5a50a1f5a2deab59db816d6568eeff.tar.gz | |
Handle being torn down while in the transaction.
| -rw-r--r-- | src/mirrored_supervisor.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mirrored_supervisor.erl b/src/mirrored_supervisor.erl index 5d01a56ffb..66dafaecb3 100644 --- a/src/mirrored_supervisor.erl +++ b/src/mirrored_supervisor.erl @@ -392,8 +392,10 @@ demonitor_all_peers(#state{peer_monitors = Peers}) -> maybe_start(Delegate, ChildSpec) -> case mnesia:transaction(fun() -> check_start(Delegate, ChildSpec) end) of - {atomic, start} -> start(Delegate, ChildSpec); - {atomic, Pid} -> {ok, Pid} + {atomic, start} -> start(Delegate, ChildSpec); + {atomic, Pid} -> {ok, Pid}; + %% If we are torn down while in the transaction... + {aborted, {killed, _}} -> ignore end. check_start(Delegate, ChildSpec) -> |
