diff options
author | Matthew Sackman <matthew@rabbitmq.com> | 2011-02-07 16:50:11 +0000 |
---|---|---|
committer | Matthew Sackman <matthew@rabbitmq.com> | 2011-02-07 16:50:11 +0000 |
commit | 91014e9a0e590390f69a8b525e0043a58e6d2241 (patch) | |
tree | 404e674a345e1c48aa9b21de6ba3aad79718de4e | |
parent | 6c589ca4cbbd455248a62e2c0d1991d1a039dba7 (diff) | |
download | rabbitmq-server-bug23814.tar.gz |
Make with_exit_handler more robust and able to cope with the other forms of shutdown and nodedownbug23814
-rw-r--r-- | src/rabbit_misc.erl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/rabbit_misc.erl b/src/rabbit_misc.erl index 7d916797..e36b1dd1 100644 --- a/src/rabbit_misc.erl +++ b/src/rabbit_misc.erl @@ -350,8 +350,11 @@ throw_on_error(E, Thunk) -> with_exit_handler(Handler, Thunk) -> try Thunk() - catch exit:{R, _} when R =:= noproc; R =:= nodedown; - R =:= normal; R =:= shutdown -> + catch + exit:{R, _} when R =:= noproc; R =:= nodedown; + R =:= normal; R =:= shutdown -> + Handler(); + exit:{{R, _}, _} when R =:= nodedown; R =:= shutdown -> Handler() end. |