Skip to content

Commit

Permalink
oops, fixed bug where player servers would return the proxy than server
Browse files Browse the repository at this point in the history
  • Loading branch information
ham1255 committed Jul 17, 2022
1 parent 6a6e303 commit 482dfc5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ public Multimap<String, UUID> jedisTask(Jedis jedis) {
for (String serverId : getServerIds()) {
Set<String> players = jedis.smembers("proxy:" + serverId + ":usersOnline");
for (String player : players) {
builder.put(serverId, UUID.fromString(player));

builder.put(jedis.hget("player:" + player, "server"), UUID.fromString(player));
}
}
return builder.build();
Expand All @@ -225,7 +226,7 @@ public Multimap<String, UUID> clusterJedisTask(JedisCluster jedisCluster) {
for (String serverId : getServerIds()) {
Set<String> players = jedisCluster.smembers("proxy:" + serverId + ":usersOnline");
for (String player : players) {
builder.put(serverId, UUID.fromString(player));
builder.put(jedisCluster.hget("player:" + player, "server"), UUID.fromString(player));
}
}
return builder.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ public Multimap<String, UUID> jedisTask(Jedis jedis) {
for (String serverId : getServerIds()) {
Set<String> players = jedis.smembers("proxy:" + serverId + ":usersOnline");
for (String player : players) {
builder.put(serverId, UUID.fromString(player));
builder.put(jedis.hget("player:" + player, "server"), UUID.fromString(player));
}
}
return builder.build();
Expand All @@ -389,7 +389,7 @@ public Multimap<String, UUID> clusterJedisTask(JedisCluster jedisCluster) {
for (String serverId : getServerIds()) {
Set<String> players = jedisCluster.smembers("proxy:" + serverId + ":usersOnline");
for (String player : players) {
builder.put(serverId, UUID.fromString(player));
builder.put(jedisCluster.hget("player:" + player, "server"), UUID.fromString(player));
}
}
return builder.build();
Expand Down

0 comments on commit 482dfc5

Please sign in to comment.