Ensure machine monitors are removed when member steps down.
This moves the call to ra_members:remove_all/2 to be called whenever
a node enters follower state rather than exiting leader as was done
before. When performing leadership transfer the old leader passes
via the await_condition state and would have left machine monitors behind.
Ensure machine monitors are removed when member steps down.
This moves the call to
ra_members:remove_all/2
to be called whenever a node enters follower state rather than exiting leader as was done before. When performing leadership transfer the old leader passes via the await_condition state and would have left machine monitors behind.