mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2024-11-22 20:28:00 +00:00
Do not poison the pubsub handler, in order to prevent shutdown hangs.
This commit is contained in:
parent
d65a316427
commit
db0ea751e9
@ -313,7 +313,7 @@ public final class RedisBungee extends Plugin implements Listener {
|
||||
getProxy().getPluginManager().registerListener(this, this);
|
||||
api = new RedisBungeeAPI(this);
|
||||
psl = new PubSubListener();
|
||||
new Thread(psl, "RedisBungee PubSub Listener").start();
|
||||
getProxy().getScheduler().runAsync(this, psl);
|
||||
getProxy().getScheduler().schedule(this, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -353,7 +353,6 @@ public final class RedisBungee extends Plugin implements Listener {
|
||||
public void onDisable() {
|
||||
if (pool != null) {
|
||||
// Poison the PubSub listener
|
||||
psl.poison();
|
||||
getProxy().getScheduler().cancel(this);
|
||||
Jedis tmpRsc = pool.getResource();
|
||||
try {
|
||||
@ -633,11 +632,6 @@ public final class RedisBungee extends Plugin implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
public void poison() {
|
||||
jpsh.unsubscribe();
|
||||
pool.returnResource(rsc);
|
||||
}
|
||||
|
||||
public void addChannel(String... channel) {
|
||||
jpsh.subscribe(channel);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user