diff options
author | Simon MacMullen <simon@lshift.net> | 2010-04-28 12:41:09 +0100 |
---|---|---|
committer | Simon MacMullen <simon@lshift.net> | 2010-04-28 12:41:09 +0100 |
commit | b54e1b37f2a0b168fe0c4add73c49ca9dfa48e6d (patch) | |
tree | 3f44468fcd9281511d440d00842be26a4c6011d7 | |
parent | ed59c8af0c29c90c8310c621555965c88d534d10 (diff) | |
download | rabbitmq-server-b54e1b37f2a0b168fe0c4add73c49ca9dfa48e6d.tar.gz |
Always catch, don't ever allow the server process to die.
-rw-r--r-- | src/delegate.erl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/delegate.erl b/src/delegate.erl index 88abb20b..5ed70351 100644 --- a/src/delegate.erl +++ b/src/delegate.erl @@ -142,6 +142,9 @@ server(Hash) -> list_to_atom("delegate_process_" ++ integer_to_list(Hash)). safe_invoke(FPid, Pid) -> + % We need the catch here for the local case. In the remote case there will + % already have been a catch in handle_ca{ll,st} below, but that's OK, catch + % is idempotent. case catch FPid(Pid) of {'EXIT', Reason} -> {error, {'EXIT', Reason}, Pid}; @@ -158,7 +161,7 @@ init([]) -> {ok, no_state}. handle_call({thunk, Thunk}, _From, State) -> - {reply, Thunk(), State}. + {reply, catch Thunk(), State}. handle_cast({thunk, Thunk}, State) -> catch Thunk(), |