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 | e3896507c579837b43abac9f58ecfbe498d5a6a6 (patch) | |
| tree | 404e674a345e1c48aa9b21de6ba3aad79718de4e | |
| parent | 013a60ff0c1093d26319e90926ddfd32c3db48da (diff) | |
| download | rabbitmq-server-git-e3896507c579837b43abac9f58ecfbe498d5a6a6.tar.gz | |
Make with_exit_handler more robust and able to cope with the other forms of shutdown and nodedown
| -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 7d9167973d..e36b1dd12c 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. |
