Skip to content

Commit

Permalink
Send into the alias in cets_mon_cleaner
Browse files Browse the repository at this point in the history
  • Loading branch information
arcusfelis committed Jul 28, 2023
1 parent e417050 commit ca9d9b5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/cets_mon_cleaner.erl
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,16 @@ handle_erase(State) ->
maps:foreach(fun send_down_all/2, State),
maps:with(state_keys(), State).

send_down_all(Mon, Pid) when is_reference(Mon) ->
Pid ! {cets_remote_down, Mon, all};
send_down_all(Mon, _Pid) when is_reference(Mon) ->
Mon ! {cets_remote_down, Mon, all};
send_down_all(_Key, _Val) ->
true.

handle_remote_down(Num, State) ->
maps:foreach(fun(K, V) -> send_remote_down(K, V, Num) end, State),
State.

send_remote_down(Mon, Pid, Num) when is_reference(Mon) ->
Pid ! {cets_remote_down, Mon, Num};
send_remote_down(Mon, _Pid, Num) when is_reference(Mon) ->
Mon ! {cets_remote_down, Mon, Num};
send_remote_down(_Key, _Val, _Num) ->
true.
4 changes: 4 additions & 0 deletions test/cets_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,10 @@ remote_down_is_not_received_after_timeout(Config) ->
Ref = erlang:monitor(process, Pid2),
exit(Pid2, kill),
receive_down_for_monitor(Ref),
MonProc = remote_down_is_not_received_after_timeout_1_mon,
MonProc ! check,
%% Ensure check processed
gen_server:call(MonProc, dump),
ensure_no_down_message().

start(Node, Tab) ->
Expand Down

0 comments on commit ca9d9b5

Please sign in to comment.