Skip to content

Commit

Permalink
Add better handling of more than 2 proxies in multi-proxy setup
Browse files Browse the repository at this point in the history
  • Loading branch information
BenCodez committed Mar 3, 2024
1 parent 040e467 commit 040fafe
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ public void onReceive(String[] data) {
logInfo("Multi-proxy status message received");
} else if (data[0].equalsIgnoreCase("ClearVote")) {
clearVote(data[2]);
// cachedOnlineVotes.remove(data[2]);
if (getPrimaryServer()) {
sendMultiProxyServerMessage("ClearVotePrimary", data[1], data[2]);
}
} else if (data[0].equalsIgnoreCase("ClearVotePrimary")) {
clearVote(data[2]);
} else if (data[0].equalsIgnoreCase("login")) {
addNonVotedPlayerCache(data[1], data[2]);
// nonVotedPlayersCache.addPlayer(data[1], data[2]);
Expand Down Expand Up @@ -134,7 +138,11 @@ public void onMessage(String channel, String[] data) {
logInfo("Multi-proxy status message received");
} else if (data[0].equalsIgnoreCase("ClearVote")) {
clearVote(data[2]);
// cachedOnlineVotes.remove(data[2]);
if (getPrimaryServer()) {
sendMultiProxyServerMessage("ClearVotePrimary", data[1], data[2]);
}
} else if (data[0].equalsIgnoreCase("ClearVotePrimary")) {
clearVote(data[2]);
} else if (data[0].equalsIgnoreCase("login")) {
addNonVotedPlayerCache(data[1], data[2]);
// nonVotedPlayersCache.addPlayer(data[1], data[2]);
Expand Down

0 comments on commit 040fafe

Please sign in to comment.