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 | baafee52be6f551fa26d13a5274e9a23ec7fc216 (patch) | |
| tree | 3f44468fcd9281511d440d00842be26a4c6011d7 /src | |
| parent | 4a6dad447066a372e6c10543d3d5a82825053586 (diff) | |
| download | rabbitmq-server-git-baafee52be6f551fa26d13a5274e9a23ec7fc216.tar.gz | |
Always catch, don't ever allow the server process to die.
Diffstat (limited to 'src')
| -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 88abb20bd3..5ed7035160 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(), |
