diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/delegate.erl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/delegate.erl b/src/delegate.erl index 03086a590e..460a48996f 100644 --- a/src/delegate.erl +++ b/src/delegate.erl @@ -204,9 +204,13 @@ handle_cast({invoke, Fun, Grouped}, State = #state{node = Node}) -> handle_info({'DOWN', Ref, process, Object, Info}, State = #state{monitors = Monitors}) -> - WantsMonitor = dict:fetch(Ref, Monitors), - WantsMonitor ! {'DOWN', Ref, process, Object, Info}, - {noreply, State#state{monitors = dict:erase(Ref, Monitors)}, hibernate}; + {noreply, case dict:find(Ref, Monitors) of + {ok, WantsMonitor} -> + WantsMonitor ! {'DOWN', Ref, process, Object, Info}, + State#state{monitors = dict:erase(Ref, Monitors)}; + error -> + State + end, hibernate}; handle_info(_Info, State) -> {noreply, State, hibernate}. |
