mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2024-11-22 20:28:00 +00:00
ServerConnectedEvent task doesn't really benefit from pipelining. Possible fix for #23?
This commit is contained in:
parent
f0164c3c8c
commit
431ff013e1
@ -158,12 +158,10 @@ public class RedisBungeeListener implements Listener {
|
||||
plugin.getProxy().getScheduler().runAsync(plugin, new RedisCallable<Void>(plugin) {
|
||||
@Override
|
||||
protected Void call(Jedis jedis) {
|
||||
Pipeline pipeline = jedis.pipelined();
|
||||
pipeline.hset("player:" + event.getPlayer().getUniqueId().toString(), "server", event.getServer().getInfo().getName());
|
||||
pipeline.publish("redisbungee-data", RedisBungee.getGson().toJson(new DataManager.DataManagerMessage<>(
|
||||
jedis.hset("player:" + event.getPlayer().getUniqueId().toString(), "server", event.getServer().getInfo().getName());
|
||||
jedis.publish("redisbungee-data", RedisBungee.getGson().toJson(new DataManager.DataManagerMessage<>(
|
||||
event.getPlayer().getUniqueId(), DataManager.DataManagerMessage.Action.SERVER_CHANGE,
|
||||
new DataManager.ServerChangePayload(event.getServer().getInfo().getName()))));
|
||||
pipeline.sync();
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user