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
  • Loading branch information
efekurbann authored Jun 17, 2024
1 parent 3314c5e commit be0c6be
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,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 @@ -281,7 +286,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 be0c6be

Please sign in to comment.