diff --git a/src/main/java/net/krakatoa/proxy/ProxySystem.java b/src/main/java/net/krakatoa/proxy/ProxySystem.java index 13b8137..cb4f0b6 100644 --- a/src/main/java/net/krakatoa/proxy/ProxySystem.java +++ b/src/main/java/net/krakatoa/proxy/ProxySystem.java @@ -85,6 +85,11 @@ public class ProxySystem extends Plugin { this.kraSocketClient.getSocketClient().getConnection().close(); this.kraSocketClient.getSocketClient().getConnection().closeConnection(1, ""); + this.mongoManager.getMongoClient().close(); + + this.redisManager.getConnection().close(); + this.redisManager.getClient().shutdown(); + instance = null; } diff --git a/src/main/java/net/krakatoa/proxy/redis/RedisManager.java b/src/main/java/net/krakatoa/proxy/redis/RedisManager.java index c22e514..84c217d 100644 --- a/src/main/java/net/krakatoa/proxy/redis/RedisManager.java +++ b/src/main/java/net/krakatoa/proxy/redis/RedisManager.java @@ -2,6 +2,7 @@ package net.krakatoa.proxy.redis; import io.lettuce.core.RedisClient; import io.lettuce.core.api.StatefulRedisConnection; +import io.lettuce.core.api.reactive.RedisKeyReactiveCommands; import io.lettuce.core.api.sync.RedisStringCommands; import lombok.Data; @@ -13,12 +14,15 @@ public class RedisManager { private RedisClient client; private StatefulRedisConnection connection; private RedisStringCommands commands; + private RedisKeyReactiveCommands keyReactiveCommands; public void connect() { this.client = RedisClient.create(this.getConnectionUri()); this.connection = client.connect(); this.commands = connection.sync(); + this.keyReactiveCommands = client.connect().reactive(); - commands.set("test", "im here"); + this.getKeyReactiveCommands().del("player"); } } +// RedisKeyReactiveCommands \ No newline at end of file