diff --git a/components/heartbeat-management/io.entgra.server.bootup.heartbeat.beacon/src/main/java/io/entgra/server/bootup/heartbeat/beacon/service/HeartBeatManagementServiceImpl.java b/components/heartbeat-management/io.entgra.server.bootup.heartbeat.beacon/src/main/java/io/entgra/server/bootup/heartbeat/beacon/service/HeartBeatManagementServiceImpl.java index cd70914d46d..cb9fbb85683 100644 --- a/components/heartbeat-management/io.entgra.server.bootup.heartbeat.beacon/src/main/java/io/entgra/server/bootup/heartbeat/beacon/service/HeartBeatManagementServiceImpl.java +++ b/components/heartbeat-management/io.entgra.server.bootup.heartbeat.beacon/src/main/java/io/entgra/server/bootup/heartbeat/beacon/service/HeartBeatManagementServiceImpl.java @@ -212,10 +212,8 @@ public class HeartBeatManagementServiceImpl implements HeartBeatManagementServic presentCandidate.getTimeOfElection().before(new Timestamp(System.currentTimeMillis() - TimeUnit.SECONDS.toMillis(elapsedTimeInSeconds)))) { heartBeatDAO.purgeCandidates(); - electCandidate(servers); - } else { - electCandidate(servers); } + electCandidate(servers); HeartBeatBeaconDAOFactory.commitTransaction(); } } catch (HeartBeatDAOException e) {