Skip to content

Commit

Permalink
Fixed bug where server was not setting itself as primary on init
Browse files Browse the repository at this point in the history
  • Loading branch information
jskupsik committed Jan 3, 2025
1 parent d52a6fc commit 425c695
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions grails-app/services/io/xh/hoist/cluster/ClusterService.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class ClusterService extends BaseService implements ApplicationListener<Applicat
: 'Multi-instance is disabled - instances will avoid clustering.'
)

adjustPrimaryStatus()
cluster.addMembershipListener([
memberAdded : { MembershipEvent e -> adjustPrimaryStatus(e.members) },
memberRemoved: { MembershipEvent e -> adjustPrimaryStatus(e.members) }
Expand Down Expand Up @@ -178,6 +179,7 @@ class ClusterService extends BaseService implements ApplicationListener<Applicat
logInfo("I have become the primary instance. All hail me, '$instanceName'") :
logInfo('I am no longer the primary instance.')
}

}

private Member getMember(String instanceName) {
Expand Down

0 comments on commit 425c695

Please sign in to comment.