Skip to content

Commit

Permalink
Handle new aten:[un]register return values.
Browse files Browse the repository at this point in the history
  • Loading branch information
kjnilsson committed Jan 3, 2024
1 parent 3503c79 commit 4e6ec70
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/ra_server_proc.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,7 @@ follower_leader_change(Old, #state{pending_commands = Pending,
LeaderNode = ra_lib:ra_server_id_node(NewLeader),
ok = aten_register(LeaderNode),
OldLeaderNode = ra_lib:ra_server_id_node(OldLeader),
ok = aten:unregister(OldLeaderNode),
_ = aten:unregister(OldLeaderNode),
ok = record_leader_change(NewLeader, New),
% leader has either changed or just been set
?INFO("~ts: detected a new leader ~w in term ~b",
Expand All @@ -1502,7 +1502,12 @@ aten_register(Node) ->
case node() of
Node -> ok;
_ ->
aten:register(Node)
case aten:register(Node) of
ignore ->
ok;
Res ->
Res
end
end.

swap_monitor(MRef, L) ->
Expand Down

0 comments on commit 4e6ec70

Please sign in to comment.