Skip to content

Commit

Permalink
Added null-check for server keys (#106)
Browse files Browse the repository at this point in the history
Fixes #105

(cherry picked from commit be0c6be)
  • Loading branch information
efekurbann authored and ham1255 committed Sep 26, 2024
1 parent e0bca62 commit 981d42d
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,12 @@ public Multimap<String, UUID> doPooledPipeline(Pipeline pipeline) {
responses.put(uuid, pipeline.hget("redis-bungee::" + networkId + "::player::" + uuid + "::data", "server"));
}
pipeline.sync();
responses.forEach((uuid, response) -> builder.put(response.get(), uuid));
responses.forEach((uuid, response) -> {
String key = response.get();
if (key == null) return;

builder.put(key, uuid);
});
return builder.build();
}

Expand All @@ -262,7 +267,12 @@ public Multimap<String, UUID> clusterPipeline(ClusterPipeline pipeline) {
responses.put(uuid, pipeline.hget("redis-bungee::" + networkId + "::player::" + uuid + "::data", "server"));
}
pipeline.sync();
responses.forEach((uuid, response) -> builder.put(response.get(), uuid));
responses.forEach((uuid, response) -> {
String key = response.get();
if (key == null) return;

builder.put(key, uuid);
});
return builder.build();
}
}.call();
Expand Down

0 comments on commit 981d42d

Please sign in to comment.